結果

問題 No.129 お年玉(2)
ユーザー 小指が強い人小指が強い人
提出日時 2015-12-05 01:37:11
言語 Ruby
(3.2.2)
結果
AC  
実行時間 171 ms / 5,000 ms
コード長 179 bytes
コンパイル時間 467 ms
コンパイル使用メモリ 11,160 KB
実行使用メモリ 75,444 KB
最終ジャッジ日時 2023-08-18 17:28:30
合計ジャッジ時間 7,113 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,696 KB
testcase_01 AC 171 ms
75,444 KB
testcase_02 AC 71 ms
15,028 KB
testcase_03 AC 68 ms
15,300 KB
testcase_04 AC 70 ms
15,272 KB
testcase_05 AC 108 ms
42,364 KB
testcase_06 AC 84 ms
29,476 KB
testcase_07 AC 111 ms
42,960 KB
testcase_08 AC 120 ms
49,200 KB
testcase_09 AC 81 ms
26,456 KB
testcase_10 AC 115 ms
47,476 KB
testcase_11 AC 92 ms
32,452 KB
testcase_12 AC 71 ms
15,520 KB
testcase_13 AC 71 ms
15,536 KB
testcase_14 AC 93 ms
29,048 KB
testcase_15 AC 88 ms
28,152 KB
testcase_16 AC 95 ms
34,012 KB
testcase_17 AC 80 ms
23,032 KB
testcase_18 AC 109 ms
45,516 KB
testcase_19 AC 136 ms
60,944 KB
testcase_20 AC 101 ms
38,396 KB
testcase_21 AC 83 ms
24,988 KB
testcase_22 AC 96 ms
38,204 KB
testcase_23 AC 116 ms
47,476 KB
testcase_24 AC 153 ms
68,952 KB
testcase_25 AC 91 ms
32,728 KB
testcase_26 AC 105 ms
42,656 KB
testcase_27 AC 100 ms
40,396 KB
testcase_28 AC 96 ms
36,548 KB
testcase_29 AC 71 ms
15,024 KB
testcase_30 AC 68 ms
15,252 KB
testcase_31 AC 67 ms
15,024 KB
testcase_32 AC 68 ms
15,036 KB
testcase_33 AC 69 ms
15,068 KB
testcase_34 AC 70 ms
15,552 KB
testcase_35 AC 72 ms
15,168 KB
testcase_36 AC 71 ms
15,468 KB
testcase_37 AC 68 ms
15,320 KB
testcase_38 AC 75 ms
17,744 KB
testcase_39 AC 75 ms
16,768 KB
testcase_40 AC 83 ms
20,164 KB
testcase_41 AC 89 ms
27,720 KB
testcase_42 AC 77 ms
21,656 KB
testcase_43 AC 68 ms
15,396 KB
testcase_44 AC 152 ms
69,512 KB
testcase_45 AC 78 ms
18,360 KB
testcase_46 AC 73 ms
15,560 KB
testcase_47 AC 130 ms
54,176 KB
testcase_48 AC 123 ms
49,952 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
m = gets.to_i
d1 = (n / m) / 1000 * 1000
d2 = n - d1 * m
c = d2 / 1000
q1 = 1
q2 = 1
c.times do |x|
    q1 *= (x + 1)
    q2 *= m - x
end
puts (q2 / q1) % 1000000000
0