結果
問題 |
No.1465 Archaea
|
ユーザー |
![]() |
提出日時 | 2021-04-02 22:04:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 82,292 KB |
実行使用メモリ | 140,008 KB |
最終ジャッジ日時 | 2024-12-23 19:35:24 |
合計ジャッジ時間 | 2,665 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 WA * 1 |
ソースコード
import sys from collections import defaultdict sys.setrecursionlimit(1000000) def bfs(n,k): if n==1: print('YES') exit() if n<=0 or k<=0: return if d[n]==1: return d[n]=1 bfs(n-3,k-1) if n%2==0: bfs(n//2,k-1) N,K = map(int,input().split()) d = defaultdict(lambda: 0) bfs(N,K) print('NO')