結果
問題 | No.638 Sum of "not power of 2" |
ユーザー |
|
提出日時 | 2018-01-26 23:14:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 1,000 ms |
コード長 | 254 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-30 02:26:30 |
合計ジャッジ時間 | 1,439 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
N = int(input())f = [2 ** i for i in range(1000)]flag = Falsefor i in range(1, N // 2 + 1):if i not in f and (N - i) not in f:a, b = i, N - iflag = Truebreakif flag:print("{} {}".format(a, b))else:print(-1)