結果

問題 No.129 お年玉(2)
ユーザー sekiya9311sekiya9311
提出日時 2016-10-20 01:50:07
言語 Python2
(2.7.18)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 176 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 6,512 KB
実行使用メモリ 6,360 KB
最終ジャッジ日時 2023-08-18 17:44:15
合計ジャッジ時間 2,905 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,136 KB
testcase_01 AC 54 ms
6,328 KB
testcase_02 AC 10 ms
6,176 KB
testcase_03 AC 10 ms
5,968 KB
testcase_04 AC 10 ms
6,048 KB
testcase_05 AC 26 ms
6,328 KB
testcase_06 AC 21 ms
6,312 KB
testcase_07 AC 33 ms
6,216 KB
testcase_08 AC 32 ms
6,216 KB
testcase_09 AC 18 ms
6,092 KB
testcase_10 AC 38 ms
6,296 KB
testcase_11 AC 24 ms
6,156 KB
testcase_12 AC 10 ms
6,004 KB
testcase_13 AC 11 ms
6,128 KB
testcase_14 AC 21 ms
6,216 KB
testcase_15 AC 21 ms
6,112 KB
testcase_16 AC 26 ms
6,360 KB
testcase_17 AC 17 ms
6,116 KB
testcase_18 AC 32 ms
6,192 KB
testcase_19 AC 39 ms
6,324 KB
testcase_20 AC 30 ms
6,336 KB
testcase_21 AC 19 ms
6,076 KB
testcase_22 AC 26 ms
6,252 KB
testcase_23 AC 37 ms
6,284 KB
testcase_24 AC 44 ms
6,356 KB
testcase_25 AC 22 ms
6,208 KB
testcase_26 AC 29 ms
6,276 KB
testcase_27 AC 27 ms
6,300 KB
testcase_28 AC 27 ms
6,144 KB
testcase_29 AC 10 ms
6,164 KB
testcase_30 AC 10 ms
5,992 KB
testcase_31 AC 11 ms
5,980 KB
testcase_32 AC 11 ms
6,108 KB
testcase_33 AC 10 ms
6,052 KB
testcase_34 AC 10 ms
6,056 KB
testcase_35 AC 10 ms
6,112 KB
testcase_36 AC 11 ms
6,148 KB
testcase_37 AC 11 ms
6,064 KB
testcase_38 AC 13 ms
6,152 KB
testcase_39 AC 12 ms
6,192 KB
testcase_40 AC 15 ms
6,136 KB
testcase_41 AC 19 ms
6,088 KB
testcase_42 AC 15 ms
6,128 KB
testcase_43 AC 10 ms
6,120 KB
testcase_44 AC 48 ms
6,276 KB
testcase_45 AC 12 ms
6,008 KB
testcase_46 AC 11 ms
6,020 KB
testcase_47 AC 44 ms
6,360 KB
testcase_48 AC 34 ms
6,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def comb(n, r):
	res = 1
	for i in range(int(r)):
		res *= n
		n -= 1
		res //= (i + 1)
	return res

N = input()
M = input()

N //= int(1e3)
N %= M
print comb(M, N) % int(1e9)
0