結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-27 00:14:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 403 bytes |
| 記録 | |
| コンパイル時間 | 579 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,452 KB |
| 最終ジャッジ日時 | 2026-06-03 19:26:47 |
| 合計ジャッジ時間 | 2,631 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 WA * 2 |
ソースコード
import math
N = int(input())
r = 0
if N % 2 == 0:
r = int(N / 2)
else:
r = int(N // 2) + 1
findNum = False
top = 0
bottom = 0
for i in range(1, r):
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")