結果
| 問題 | No.1462 最弱WEAKER |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:48:29 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 2,000 ms |
| コード長 | 206 bytes |
| 記録 | |
| コンパイル時間 | 227 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 79,192 KB |
| 最終ジャッジ日時 | 2026-07-07 12:02:32 |
| 合計ジャッジ時間 | 3,240 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
def can_win(X):
if X == 0:
return True
current = 1
while current * 3 <= X:
current *= 3
return not can_win(X - current)
N = int(input())
print("YES" if can_win(N) else "NO")
lam6er