結果
問題 | No.1465 Archaea |
ユーザー |
![]() |
提出日時 | 2021-04-02 22:07:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 365 bytes |
コンパイル時間 | 387 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 139,008 KB |
最終ジャッジ日時 | 2024-12-23 19:37:32 |
合計ジャッジ時間 | 2,243 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
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')