結果
問題 |
No.1184 Hà Nội
|
ユーザー |
![]() |
提出日時 | 2020-08-22 13:15:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 253 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-10-15 07:26:51 |
合計ジャッジ時間 | 1,943 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 RE * 7 |
ソースコード
def hanoi(x): if x == 1: return 1 if x not in li: li[x] = (hanoi(x-1)*2+1) % 998244353 return li[x] else: return li[x] li = {} n, l = map(int, input().split()) m = n//l if n%l == 0 else n//l+1 print(hanoi(m))