void SMessageCommand::SendSNetMessage(int _cmd , RAPIDJSON_NAMESPACE::Document & _doc,RAPIDJSON_NAMESPACE::Value & _data,SocketType _type) { //模块 RAPIDJSON_NAMESPACE::Value modular(RAPIDJSON_NAMESPACE::kNumberType); int m = SMessage::GetModularByCMD(_cmd); modular.SetInt(m); _doc.AddMember(MODULAR_STRING,modular,_doc.GetAllocator()); //命令 RAPIDJSON_NAMESPACE::Value command(RAPIDJSON_NAMESPACE::kNumberType); int c = SMessage::GetCommandByCMD(_cmd); command.SetInt(c); _doc.AddMember(COMMAND_STRING,command,_doc.GetAllocator()); _doc.AddMember(DATA_STRING,_data,_doc.GetAllocator()); RAPIDJSON_NAMESPACE::StringBuffer buffer; RAPIDJSON_NAMESPACE::Writer<RAPIDJSON_NAMESPACE::StringBuffer> writer(buffer); _doc.Accept(writer); //lee 0901修改切入后台多人副本切换主机bug /* if (_cmd == C_FIGHT_PARSER_COMMAND_AIHOSTQUIT || _cmd == C_FIGHT_PARSER_SET_STATE) { vector<char> charList=STools::StringToVector(buffer.GetString()); SNetManager::Instance()->Send(charList,_type); } else { SNetManager::Instance()->Send(buffer.GetString(),_type); } */ }
int main() { int nt, i; unsigned long long int x, y; scanf("%d",&nt); for(i = 0; i < nt; i++) { scanf("%d",&n[i]); } for(i = 0; i < nt; i++) { if(n[i] == 1) printf("1\n"); else { x = modular(2,n[i],100000); printf("%lld\n", x-1); } } return 0; }