結果

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

ソースコード

diff #

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

N = input()
M = input()

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