結果
| 問題 | No.1462 最弱WEAKER |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-02 21:24:53 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 2,000 ms |
| + 672µs | |
| コード長 | 398 bytes |
| 記録 | |
| コンパイル時間 | 71 ms |
| コンパイル使用メモリ | 82,276 KB |
| 実行使用メモリ | 57,640 KB |
| 最終ジャッジ日時 | 2026-10-06 16:43:05 |
| 合計ジャッジ時間 | 2,117 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
import sys
input = sys.stdin.readline
from collections import *
"""
def f(x):
if x in memo:
return memo[x]
res = False
for k in range(x+1):
if 3**k<=x:
res |= not f(x-3**k)
memo[x] = res
return res
memo = defaultdict(int)
memo[0] = False
for i in range(100):
print(f(i))
"""
N = int(input())
if N%2==1:
print('NO')
else:
print('YES')