結果

問題 No.129 お年玉(2)
ユーザー 👑 KazunKazun
提出日時 2021-01-04 17:26:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 60 ms / 5,000 ms
コード長 190 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 82,212 KB
実行使用メモリ 65,428 KB
最終ジャッジ日時 2024-04-23 03:22:48
合計ジャッジ時間 3,911 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,480 KB
testcase_01 AC 37 ms
52,072 KB
testcase_02 AC 38 ms
53,140 KB
testcase_03 AC 38 ms
51,936 KB
testcase_04 AC 38 ms
52,468 KB
testcase_05 AC 39 ms
54,128 KB
testcase_06 AC 52 ms
62,756 KB
testcase_07 AC 52 ms
62,024 KB
testcase_08 AC 39 ms
53,564 KB
testcase_09 AC 49 ms
62,872 KB
testcase_10 AC 49 ms
61,868 KB
testcase_11 AC 51 ms
62,392 KB
testcase_12 AC 38 ms
52,468 KB
testcase_13 AC 38 ms
53,620 KB
testcase_14 AC 54 ms
62,816 KB
testcase_15 AC 52 ms
62,828 KB
testcase_16 AC 56 ms
64,216 KB
testcase_17 AC 48 ms
60,956 KB
testcase_18 AC 51 ms
61,460 KB
testcase_19 AC 42 ms
58,984 KB
testcase_20 AC 57 ms
65,324 KB
testcase_21 AC 50 ms
61,200 KB
testcase_22 AC 48 ms
62,456 KB
testcase_23 AC 50 ms
62,236 KB
testcase_24 AC 38 ms
52,664 KB
testcase_25 AC 50 ms
62,548 KB
testcase_26 AC 42 ms
59,340 KB
testcase_27 AC 44 ms
61,076 KB
testcase_28 AC 60 ms
65,428 KB
testcase_29 AC 37 ms
53,200 KB
testcase_30 AC 37 ms
52,096 KB
testcase_31 AC 37 ms
52,520 KB
testcase_32 AC 37 ms
52,952 KB
testcase_33 AC 37 ms
53,268 KB
testcase_34 AC 38 ms
52,188 KB
testcase_35 AC 38 ms
51,828 KB
testcase_36 AC 38 ms
53,512 KB
testcase_37 AC 38 ms
52,668 KB
testcase_38 AC 42 ms
58,148 KB
testcase_39 AC 41 ms
58,928 KB
testcase_40 AC 44 ms
59,880 KB
testcase_41 AC 44 ms
59,764 KB
testcase_42 AC 42 ms
58,156 KB
testcase_43 AC 37 ms
54,084 KB
testcase_44 AC 44 ms
58,776 KB
testcase_45 AC 38 ms
52,540 KB
testcase_46 AC 38 ms
52,660 KB
testcase_47 AC 51 ms
61,028 KB
testcase_48 AC 38 ms
53,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def nCr(n,r):
    r=min(r,n-r)
    X=1
    for i in range(1,r+1):
        X*=n-i+1
        X//=i
    return X%Mod
N=int(input())
M=int(input())
Mod=10**9


R=N%(1000*M)//1000
print(nCr(M,R))
0