結果
問題 |
No.638 Sum of "not power of 2"
|
ユーザー |
|
提出日時 | 2018-01-27 00:00:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 345 bytes |
コンパイル時間 | 276 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-30 02:35:59 |
合計ジャッジ時間 | 1,723 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 WA * 1 |
ソースコード
import math N = int(input()) findNum = False top = 0 bottom = 0 for i in range(1, int(N/2) + 1): top = i bottom = N - i res1, _ = math.modf(math.log2(top)) res2, _ = math.modf(math.log2(bottom)) if res1 != 0 and res2 != 0: findNum = True break if findNum: print(top, " ", bottom) else: print("-1")