結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-08 20:45:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 1,000 ms |
| コード長 | 189 bytes |
| コンパイル時間 | 466 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 53,296 KB |
| 最終ジャッジ日時 | 2024-12-31 13:25:17 |
| 合計ジャッジ時間 | 1,699 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
N = int(input())
s = set()
i = 0
while 2**i<N:
s.add(2**i)
i += 1
for a in range(1, N):
if a not in s and N-a not in s:
print(a, N-a)
break
else:
print(-1)