結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
KoshStorm
|
| 提出日時 | 2018-01-26 22:58:15 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-10-09 13:04:52 |
| 合計ジャッジ時間 | 1,494 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 WA * 2 |
ソースコード
import math N = int(input()) two_pow = [1] bit = 1 while bit < N: bit <<= 1 two_pow.append(bit) if N % 2 == 1: if N < 9: print(-1) else: if not ((N-3) in two_pow): print(str(min(3,N-3)) + " " + str(max(3,N-3))) elif not ((N-5) in two_pow) : print(str(min(5,N-5)) + " " + str(max(5,N-5))) else: print(str(min(6,N-6)) + " " + str(max(6,N-6))) else: print(str(min(3,N-3)) + " " + str(max(3,N-3)))
KoshStorm