結果
| 問題 | No.3088 XOR = SUM |
| コンテスト | |
| ユーザー |
👑 amentorimaru
|
| 提出日時 | 2025-03-16 15:59:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 544 bytes |
| 記録 | |
| コンパイル時間 | 604 ms |
| コンパイル使用メモリ | 82,404 KB |
| 実行使用メモリ | 77,296 KB |
| 最終ジャッジ日時 | 2025-03-17 08:27:42 |
| 合計ジャッジ時間 | 20,672 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 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=[(-1000,0),(-1000,0),(-1000,0),(2,1),(2,1),(4,1),(4,2),(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()
amentorimaru