結果
| 問題 | No.3088 XOR = SUM | 
| コンテスト | |
| ユーザー |  yu23578 | 
| 提出日時 | 2025-04-04 21:47:05 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 383 bytes | 
| コンパイル時間 | 1,744 ms | 
| コンパイル使用メモリ | 193,688 KB | 
| 実行使用メモリ | 7,720 KB | 
| 最終ジャッジ日時 | 2025-04-04 21:47:32 | 
| 合計ジャッジ時間 | 16,631 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 1 WA * 21 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
int T;
signed main(){
  cin>>T;
  for(int i = 0; i < T; i++){
    int N; cin>>N;
    int cnt = 1;
    for(int i = 0; i < 64; i++){
      if((1ll << i) == N){
        N--;
      }
    }
    for(int i = 0; cnt*2 < N; i++){
      cnt *= 2;
    }
    if(N == 0) cnt = 0;
    cout << cnt << " " << N-cnt << endl;
  }
}
            
            
            
        