結果

問題 No.129 お年玉(2)
ユーザー tkzw_21tkzw_21
提出日時 2015-03-01 14:08:17
言語 Ruby
(3.3.0)
結果
AC  
実行時間 204 ms / 5,000 ms
コード長 176 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 11,524 KB
実行使用メモリ 73,884 KB
最終ジャッジ日時 2023-08-18 17:04:07
合計ジャッジ時間 8,556 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,888 KB
testcase_01 AC 204 ms
73,884 KB
testcase_02 AC 84 ms
15,064 KB
testcase_03 AC 87 ms
15,120 KB
testcase_04 AC 85 ms
15,124 KB
testcase_05 AC 128 ms
41,764 KB
testcase_06 AC 106 ms
29,196 KB
testcase_07 AC 131 ms
42,384 KB
testcase_08 AC 144 ms
48,432 KB
testcase_09 AC 100 ms
26,172 KB
testcase_10 AC 140 ms
46,996 KB
testcase_11 AC 111 ms
32,364 KB
testcase_12 AC 87 ms
15,628 KB
testcase_13 AC 86 ms
15,424 KB
testcase_14 AC 108 ms
28,844 KB
testcase_15 AC 104 ms
28,008 KB
testcase_16 AC 111 ms
33,552 KB
testcase_17 AC 95 ms
23,000 KB
testcase_18 AC 133 ms
45,452 KB
testcase_19 AC 165 ms
59,804 KB
testcase_20 AC 119 ms
37,916 KB
testcase_21 AC 99 ms
24,980 KB
testcase_22 AC 118 ms
37,480 KB
testcase_23 AC 138 ms
47,064 KB
testcase_24 AC 182 ms
67,944 KB
testcase_25 AC 110 ms
32,488 KB
testcase_26 AC 131 ms
42,192 KB
testcase_27 AC 127 ms
40,100 KB
testcase_28 AC 118 ms
36,428 KB
testcase_29 AC 85 ms
15,092 KB
testcase_30 AC 91 ms
15,260 KB
testcase_31 AC 84 ms
15,072 KB
testcase_32 AC 84 ms
15,072 KB
testcase_33 AC 84 ms
15,324 KB
testcase_34 AC 85 ms
15,448 KB
testcase_35 AC 85 ms
15,268 KB
testcase_36 AC 88 ms
15,560 KB
testcase_37 AC 87 ms
15,416 KB
testcase_38 AC 91 ms
17,680 KB
testcase_39 AC 92 ms
17,036 KB
testcase_40 AC 95 ms
20,128 KB
testcase_41 AC 105 ms
27,624 KB
testcase_42 AC 93 ms
21,556 KB
testcase_43 AC 87 ms
15,572 KB
testcase_44 AC 185 ms
68,548 KB
testcase_45 AC 91 ms
18,216 KB
testcase_46 AC 86 ms
15,464 KB
testcase_47 AC 156 ms
53,828 KB
testcase_48 AC 144 ms
49,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def combi(n,m)
	a = b = 1
	for i in 1..m
		a *= i
		b *= i+n-m
	end
	return b/a
end

n = gets.to_i
m = gets.to_i

amari = (n - n/1000/m*1000*m)/1000
p combi(m,amari)%1000000000
0