結果

問題 No.129 お年玉(2)
ユーザー sekiya9311
提出日時 2016-10-20 01:46:22
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 171 bytes
コンパイル時間 707 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-11-23 14:29:30
合計ジャッジ時間 3,207 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 45 WA * 1
権限があれば一括ダウンロードができます

ソースコード

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 //= 1e3
N %= M
print comb(M, N) % int(1e9)
0