結果
問題 |
No.3088 XOR = SUM
|
ユーザー |
![]() |
提出日時 | 2025-02-21 21:19:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 529 bytes |
コンパイル時間 | 319 ms |
コンパイル使用メモリ | 82,444 KB |
実行使用メモリ | 77,252 KB |
最終ジャッジ日時 | 2025-03-14 23:38:52 |
合計ジャッジ時間 | 17,273 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()) nn = n 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 while nn >= 8: nn //= 2 v *= 2 if nn == 4: print(v*2,v*2-1) else: print(v*4,(v*4)^n) if __name__ == "__main__": main()