結果
| 問題 |
No.1462 最弱WEAKER
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-02 21:24:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 398 bytes |
| コンパイル時間 | 164 ms |
| コンパイル使用メモリ | 82,228 KB |
| 実行使用メモリ | 55,172 KB |
| 最終ジャッジ日時 | 2024-12-23 18:11:15 |
| 合計ジャッジ時間 | 1,602 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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')