結果

問題 No.1186 長方形の敷き詰め
ユーザー tyawanmusityawanmusi
提出日時 2020-08-22 17:19:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 57,120 KB
最終ジャッジ日時 2024-04-23 11:18:00
合計ジャッジ時間 4,591 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
17,824 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 661 ms
50,176 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 25 ms
10,880 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 WA -
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
ans=0
mod=998244353
f = [1]
for i in range(m):
  f += [f[-1]*(i+1) % mod]
def comb(a, b):
  return f[a]*pow(f[b], mod-2, mod)*pow(f[a-b], mod-2, mod) % mod
for i in range(m+1):
  if (m-i)%n:continue
  ans+=comb((m-i)//n+i,i)
  ans%=mod
print(ans)
0