結果
問題 |
No.1465 Archaea
|
ユーザー |
![]() |
提出日時 | 2021-04-02 22:11:05 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 200 ms |
コンパイル使用メモリ | 82,224 KB |
実行使用メモリ | 139,900 KB |
最終ジャッジ日時 | 2024-12-23 19:42:29 |
合計ジャッジ時間 | 2,306 ms |
ジャッジサーバーID (参考情報) |
judge4 / 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 and k>=0: 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')