結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-18 04:06:52 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 216 bytes |
| コンパイル時間 | 2,911 ms |
| コンパイル使用メモリ | 64,736 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 10:13:36 |
| 合計ジャッジ時間 | 3,715 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 5 |
ソースコード
import strutils,bitops let n = stdin.readLine.parseInt() if n in [1,2,3,4,5,7]: quit "-1", 0 for x in 3..<n: if x.popcount() == 1 : continue let y = n - x if y.popcount() == 1 : continue echo x," ",y break