結果

問題 No.129 お年玉(2)
ユーザー ynyn
提出日時 2015-08-27 22:29:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 249 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 8,480 KB
最終ジャッジ日時 2023-08-18 17:26:01
合計ジャッジ時間 2,797 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,924 KB
testcase_01 AC 22 ms
8,428 KB
testcase_02 AC 15 ms
7,876 KB
testcase_03 AC 15 ms
7,976 KB
testcase_04 AC 15 ms
7,896 KB
testcase_05 AC 20 ms
7,872 KB
testcase_06 AC 22 ms
7,896 KB
testcase_07 AC 24 ms
8,324 KB
testcase_08 AC 21 ms
7,848 KB
testcase_09 AC 22 ms
8,268 KB
testcase_10 AC 23 ms
8,336 KB
testcase_11 AC 21 ms
7,880 KB
testcase_12 AC 20 ms
8,312 KB
testcase_13 AC 20 ms
8,000 KB
testcase_14 AC 22 ms
7,892 KB
testcase_15 AC 21 ms
7,856 KB
testcase_16 AC 22 ms
7,976 KB
testcase_17 AC 23 ms
8,348 KB
testcase_18 AC 24 ms
8,332 KB
testcase_19 AC 22 ms
8,304 KB
testcase_20 AC 24 ms
8,036 KB
testcase_21 AC 26 ms
8,480 KB
testcase_22 AC 21 ms
8,036 KB
testcase_23 AC 24 ms
8,292 KB
testcase_24 AC 20 ms
7,948 KB
testcase_25 AC 21 ms
7,856 KB
testcase_26 AC 22 ms
7,852 KB
testcase_27 AC 20 ms
7,924 KB
testcase_28 AC 27 ms
8,344 KB
testcase_29 AC 14 ms
7,980 KB
testcase_30 AC 14 ms
7,996 KB
testcase_31 AC 15 ms
7,996 KB
testcase_32 AC 14 ms
8,068 KB
testcase_33 AC 15 ms
7,876 KB
testcase_34 AC 15 ms
7,876 KB
testcase_35 AC 14 ms
7,980 KB
testcase_36 AC 14 ms
7,884 KB
testcase_37 AC 15 ms
7,892 KB
testcase_38 AC 17 ms
7,884 KB
testcase_39 AC 17 ms
8,064 KB
testcase_40 AC 20 ms
7,948 KB
testcase_41 AC 18 ms
8,040 KB
testcase_42 AC 16 ms
7,848 KB
testcase_43 AC 16 ms
7,940 KB
testcase_44 AC 24 ms
8,256 KB
testcase_45 AC 16 ms
7,920 KB
testcase_46 AC 17 ms
7,916 KB
testcase_47 AC 25 ms
7,936 KB
testcase_48 AC 21 ms
8,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n = int(input())
m = int(input())

#配れる千円札の枚数
n = (n - n % 1000) // 1000
#余る千円札の枚数
surplus = n % m
comb = math.factorial(m) // math.factorial(surplus) // math.factorial(m - surplus)

print(comb % 10**9)
0