結果
問題 |
No.1186 長方形の敷き詰め
|
ユーザー |
![]() |
提出日時 | 2020-08-22 22:48:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 272 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 49,884 KB |
最終ジャッジ日時 | 2024-10-15 12:24:49 |
合計ジャッジ時間 | 4,104 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 3 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n,m=map(int,input().split()) mod=998244353 if n>m: print(1) else: A=[0]*m for i in range(m): if i<n-1: A[i]=1 elif i==n-1: A[i]=2 else: A[i]=A[i-1]+A[i-n] if A[i]>mod: A[i]%=mod print(A[-1])