結果

問題 No.129 お年玉(2)
ユーザー maimai
提出日時 2017-02-23 00:06:53
言語 Ruby
(3.3.0)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 142 bytes
コンパイル時間 540 ms
コンパイル使用メモリ 11,188 KB
実行使用メモリ 20,804 KB
最終ジャッジ日時 2023-08-18 17:50:08
合計ジャッジ時間 6,361 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
15,180 KB
testcase_01 AC 116 ms
20,728 KB
testcase_02 AC 69 ms
15,192 KB
testcase_03 AC 67 ms
15,052 KB
testcase_04 AC 71 ms
15,180 KB
testcase_05 AC 86 ms
18,484 KB
testcase_06 AC 80 ms
18,336 KB
testcase_07 AC 93 ms
20,080 KB
testcase_08 AC 94 ms
19,236 KB
testcase_09 AC 84 ms
18,024 KB
testcase_10 AC 96 ms
20,204 KB
testcase_11 AC 84 ms
18,392 KB
testcase_12 AC 70 ms
15,152 KB
testcase_13 AC 70 ms
15,268 KB
testcase_14 AC 84 ms
18,288 KB
testcase_15 AC 80 ms
18,136 KB
testcase_16 AC 84 ms
18,424 KB
testcase_17 AC 77 ms
17,784 KB
testcase_18 AC 95 ms
19,840 KB
testcase_19 AC 100 ms
19,988 KB
testcase_20 AC 88 ms
20,080 KB
testcase_21 AC 77 ms
17,904 KB
testcase_22 AC 83 ms
19,140 KB
testcase_23 AC 97 ms
20,328 KB
testcase_24 AC 102 ms
20,096 KB
testcase_25 AC 83 ms
18,360 KB
testcase_26 AC 90 ms
19,272 KB
testcase_27 AC 90 ms
19,380 KB
testcase_28 AC 87 ms
19,620 KB
testcase_29 AC 71 ms
15,332 KB
testcase_30 AC 68 ms
15,220 KB
testcase_31 AC 69 ms
15,036 KB
testcase_32 AC 68 ms
15,256 KB
testcase_33 AC 70 ms
15,168 KB
testcase_34 AC 68 ms
15,148 KB
testcase_35 AC 71 ms
15,096 KB
testcase_36 AC 73 ms
15,088 KB
testcase_37 AC 70 ms
15,148 KB
testcase_38 AC 73 ms
15,676 KB
testcase_39 AC 72 ms
15,824 KB
testcase_40 AC 76 ms
16,648 KB
testcase_41 AC 81 ms
17,512 KB
testcase_42 AC 74 ms
16,384 KB
testcase_43 AC 78 ms
15,244 KB
testcase_44 AC 110 ms
20,804 KB
testcase_45 AC 75 ms
15,612 KB
testcase_46 AC 76 ms
15,056 KB
testcase_47 AC 104 ms
20,556 KB
testcase_48 AC 90 ms
19,428 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def combi(n,k)
  r=1
  1.upto(k){|e|
    r=r*(n-e+1)/e
  }
  r
end
n = gets.to_i
m = gets.to_i

k = (n%(m*1000))/1000

p combi(m,k)%1000000000
0