結果
| 問題 | No.3088 XOR = SUM | 
| コンテスト | |
| ユーザー |  amentorimaru | 
| 提出日時 | 2025-03-14 01:23:24 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 532 bytes | 
| コンパイル時間 | 477 ms | 
| コンパイル使用メモリ | 82,092 KB | 
| 実行使用メモリ | 77,296 KB | 
| 最終ジャッジ日時 | 2025-03-14 23:42:36 | 
| 合計ジャッジ時間 | 18,021 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 21 WA * 1 | 
ソースコード
import sys
input = sys.stdin.readline
def read_values(): return map(int, input().split())
def read_list(): return list(read_values())
 
def main():
    t=int(input())
    for _ in range(t):
      n = int(input())
      v = 1
      ans=[(0,0),(1,0),(2,0),(2,1),(4,3),(4,3),(4,3),(4,3)]
      if n < len(ans):
      	print(*ans[n])
      	continue
      b = 1
      while n > b * 2:
      	b *= 2
      if b * (n-b) > (b//2) * (b//2-1):
      	print(b,n-b)
      else:
      	print(b//2, b//2-1)
if __name__ == "__main__":
    main()
            
            
            
        