結果
問題 | No.1462 最弱WEAKER |
ユーザー |
![]() |
提出日時 | 2025-03-20 20:48:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 206 bytes |
コンパイル時間 | 220 ms |
コンパイル使用メモリ | 82,312 KB |
実行使用メモリ | 53,812 KB |
最終ジャッジ日時 | 2025-03-20 20:48:33 |
合計ジャッジ時間 | 1,785 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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")