結果
問題 | No.2120 場合の数の下8桁 |
ユーザー | タコイモ |
提出日時 | 2022-11-04 22:47:29 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 151 ms |
コンパイル使用メモリ | 10,688 KB |
実行使用メモリ | 13,456 KB |
最終ジャッジ日時 | 2023-09-26 01:17:28 |
合計ジャッジ時間 | 5,077 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 19 ms
13,024 KB |
testcase_01 | AC | 21 ms
8,784 KB |
testcase_02 | AC | 21 ms
8,612 KB |
testcase_03 | AC | 20 ms
8,784 KB |
testcase_04 | AC | 20 ms
8,772 KB |
testcase_05 | AC | 20 ms
8,632 KB |
testcase_06 | AC | 20 ms
8,600 KB |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | AC | 19 ms
8,692 KB |
testcase_10 | AC | 20 ms
8,560 KB |
testcase_11 | AC | 20 ms
8,588 KB |
testcase_12 | AC | 20 ms
8,632 KB |
testcase_13 | AC | 811 ms
8,896 KB |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
N = int(input()) M = int(input()) from operator import mul from functools import reduce def cmb(n,r,mod): r = min(n-r,r) if r == 0: return 1 over = reduce(mul, range(n, n - r, -1)) under = reduce(mul, range(1,r + 1)) return (over // under)%mod a = cmb(N, M,10**8) s = str(a) print('0'*(8-len(s))+s)