結果

問題 No.129 お年玉(2)
ユーザー cielciel
提出日時 2015-01-16 23:29:01
言語 Ruby
(3.2.1 )
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 77 bytes
コンパイル時間 195 ms
実行使用メモリ 16,492 KB
最終ジャッジ日時 2023-01-04 19:07:54
合計ジャッジ時間 6,461 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
14,136 KB
testcase_01 AC 118 ms
16,492 KB
testcase_02 AC 74 ms
13,796 KB
testcase_03 AC 73 ms
13,852 KB
testcase_04 AC 73 ms
13,864 KB
testcase_05 AC 92 ms
15,400 KB
testcase_06 AC 87 ms
15,548 KB
testcase_07 AC 99 ms
16,172 KB
testcase_08 AC 99 ms
15,664 KB
testcase_09 AC 86 ms
15,624 KB
testcase_10 AC 102 ms
16,168 KB
testcase_11 AC 91 ms
15,656 KB
testcase_12 AC 73 ms
14,220 KB
testcase_13 AC 73 ms
13,824 KB
testcase_14 AC 88 ms
15,540 KB
testcase_15 AC 87 ms
15,288 KB
testcase_16 AC 91 ms
15,988 KB
testcase_17 AC 83 ms
15,296 KB
testcase_18 AC 100 ms
15,928 KB
testcase_19 AC 107 ms
16,076 KB
testcase_20 AC 96 ms
16,200 KB
testcase_21 AC 84 ms
15,656 KB
testcase_22 AC 92 ms
15,676 KB
testcase_23 AC 103 ms
16,148 KB
testcase_24 AC 111 ms
16,176 KB
testcase_25 AC 89 ms
15,772 KB
testcase_26 AC 96 ms
15,680 KB
testcase_27 AC 94 ms
15,652 KB
testcase_28 AC 94 ms
16,216 KB
testcase_29 AC 73 ms
13,732 KB
testcase_30 AC 75 ms
13,972 KB
testcase_31 AC 73 ms
13,876 KB
testcase_32 AC 71 ms
13,832 KB
testcase_33 AC 72 ms
13,900 KB
testcase_34 AC 72 ms
13,868 KB
testcase_35 AC 72 ms
13,824 KB
testcase_36 AC 73 ms
13,988 KB
testcase_37 AC 72 ms
13,820 KB
testcase_38 AC 75 ms
14,316 KB
testcase_39 AC 75 ms
14,472 KB
testcase_40 AC 82 ms
14,856 KB
testcase_41 AC 85 ms
15,280 KB
testcase_42 AC 80 ms
14,596 KB
testcase_43 AC 73 ms
13,868 KB
testcase_44 AC 114 ms
16,216 KB
testcase_45 AC 79 ms
14,412 KB
testcase_46 AC 73 ms
14,236 KB
testcase_47 AC 109 ms
16,184 KB
testcase_48 AC 100 ms
15,724 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k=gets.to_i/1000%(n=gets.to_i)
r=1
1.step(k){|i|r=r*(n-i+1)/i}
p r%1000000000
0