結果

問題 No.129 お年玉(2)
ユーザー lllllll88938494lllllll88938494
提出日時 2022-09-13 11:26:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 470 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 74,996 KB
最終ジャッジ日時 2024-05-07 19:27:34
合計ジャッジ時間 4,169 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
54,028 KB
testcase_01 AC 92 ms
74,808 KB
testcase_02 AC 34 ms
52,376 KB
testcase_03 AC 38 ms
52,104 KB
testcase_04 AC 35 ms
51,752 KB
testcase_05 AC 58 ms
74,492 KB
testcase_06 AC 49 ms
74,500 KB
testcase_07 AC 61 ms
74,448 KB
testcase_08 AC 64 ms
74,924 KB
testcase_09 AC 44 ms
70,988 KB
testcase_10 AC 66 ms
74,564 KB
testcase_11 AC 52 ms
74,760 KB
testcase_12 AC 34 ms
53,424 KB
testcase_13 AC 35 ms
52,336 KB
testcase_14 AC 46 ms
74,876 KB
testcase_15 AC 44 ms
72,984 KB
testcase_16 AC 49 ms
74,600 KB
testcase_17 AC 41 ms
66,380 KB
testcase_18 AC 62 ms
74,996 KB
testcase_19 AC 76 ms
74,744 KB
testcase_20 AC 53 ms
74,872 KB
testcase_21 AC 43 ms
69,668 KB
testcase_22 AC 54 ms
74,864 KB
testcase_23 AC 60 ms
74,488 KB
testcase_24 AC 80 ms
74,816 KB
testcase_25 AC 52 ms
74,568 KB
testcase_26 AC 61 ms
74,600 KB
testcase_27 AC 60 ms
74,916 KB
testcase_28 AC 54 ms
74,720 KB
testcase_29 AC 36 ms
52,936 KB
testcase_30 AC 37 ms
52,804 KB
testcase_31 AC 35 ms
53,356 KB
testcase_32 AC 33 ms
53,020 KB
testcase_33 AC 34 ms
52,128 KB
testcase_34 AC 33 ms
52,660 KB
testcase_35 AC 35 ms
52,288 KB
testcase_36 AC 34 ms
53,204 KB
testcase_37 AC 33 ms
52,520 KB
testcase_38 AC 39 ms
60,772 KB
testcase_39 AC 40 ms
61,112 KB
testcase_40 AC 39 ms
63,512 KB
testcase_41 AC 46 ms
72,604 KB
testcase_42 AC 41 ms
65,476 KB
testcase_43 AC 36 ms
53,148 KB
testcase_44 AC 83 ms
74,676 KB
testcase_45 AC 41 ms
62,148 KB
testcase_46 AC 37 ms
52,504 KB
testcase_47 AC 73 ms
74,576 KB
testcase_48 AC 68 ms
74,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
m=int(input())

amari = (n%(m*1000)) // 1000
mod=10**9

def  nCk(n,k):
    x,y=1,1
    for i in range(n,n-k,-1):
        x*=i
    for i in range(k,0,-1):
        y*=i
    return x//y

if m <= amari:
    print(1)
else:
    print(nCk(m,amari)%mod)
0