結果

問題 No.129 お年玉(2)
ユーザー ktshunktshun
提出日時 2015-06-11 15:55:58
言語 Python2
(2.7.18)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 6,512 KB
実行使用メモリ 6,384 KB
最終ジャッジ日時 2023-08-18 17:11:06
合計ジャッジ時間 3,343 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,256 KB
testcase_01 AC 65 ms
6,300 KB
testcase_02 AC 10 ms
6,124 KB
testcase_03 AC 10 ms
6,032 KB
testcase_04 AC 11 ms
6,020 KB
testcase_05 AC 31 ms
6,100 KB
testcase_06 AC 39 ms
6,168 KB
testcase_07 AC 48 ms
6,276 KB
testcase_08 AC 38 ms
6,204 KB
testcase_09 AC 48 ms
6,236 KB
testcase_10 AC 50 ms
6,328 KB
testcase_11 AC 33 ms
6,304 KB
testcase_12 AC 46 ms
6,276 KB
testcase_13 AC 49 ms
6,296 KB
testcase_14 AC 39 ms
6,220 KB
testcase_15 AC 34 ms
6,212 KB
testcase_16 AC 38 ms
6,236 KB
testcase_17 AC 47 ms
6,136 KB
testcase_18 AC 45 ms
6,324 KB
testcase_19 AC 50 ms
6,192 KB
testcase_20 AC 45 ms
6,216 KB
testcase_21 AC 55 ms
6,168 KB
testcase_22 AC 34 ms
6,140 KB
testcase_23 AC 49 ms
6,264 KB
testcase_24 AC 51 ms
6,152 KB
testcase_25 AC 32 ms
6,260 KB
testcase_26 AC 37 ms
6,128 KB
testcase_27 AC 35 ms
6,336 KB
testcase_28 AC 55 ms
6,384 KB
testcase_29 AC 11 ms
6,124 KB
testcase_30 AC 10 ms
6,060 KB
testcase_31 AC 10 ms
6,104 KB
testcase_32 AC 11 ms
6,016 KB
testcase_33 AC 10 ms
6,132 KB
testcase_34 AC 10 ms
6,028 KB
testcase_35 AC 10 ms
6,212 KB
testcase_36 AC 10 ms
6,244 KB
testcase_37 AC 11 ms
6,096 KB
testcase_38 AC 15 ms
6,088 KB
testcase_39 AC 17 ms
6,108 KB
testcase_40 AC 31 ms
6,100 KB
testcase_41 AC 24 ms
6,112 KB
testcase_42 AC 14 ms
6,124 KB
testcase_43 AC 16 ms
6,248 KB
testcase_44 AC 58 ms
6,156 KB
testcase_45 AC 14 ms
6,104 KB
testcase_46 AC 19 ms
6,076 KB
testcase_47 AC 56 ms
6,320 KB
testcase_48 AC 38 ms
6,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-

#from scipy.misc import comb なぜかこれを入れると通らない。
import math

if __name__ == "__main__":
	n = input()
	m = input()
	n /= 1000
	n %= m
	if n == 0:
		print 1
		exit()
	else:
#		print comb(m,n) % (10**9)
		ans = math.factorial(m) / (math.factorial(n) * math.factorial(m-n))
		print ans % (10**9)
0