結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-18 04:06:52 |
| 言語 | Nim (2.2.6) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 216 bytes |
| 記録 | |
| コンパイル時間 | 2,321 ms |
| コンパイル使用メモリ | 69,568 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-22 08:24:44 |
| 合計ジャッジ時間 | 3,039 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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