結果

問題 No.2120 場合の数の下8桁
ユーザー maguroflymagurofly
提出日時 2022-11-05 00:53:51
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 11,420 KB
実行使用メモリ 20,388 KB
最終ジャッジ日時 2023-09-26 03:03:05
合計ジャッジ時間 10,655 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
20,188 KB
testcase_01 AC 112 ms
20,364 KB
testcase_02 AC 112 ms
20,228 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 115 ms
20,364 KB
testcase_06 WA -
testcase_07 AC 113 ms
20,044 KB
testcase_08 AC 1,241 ms
20,388 KB
testcase_09 AC 111 ms
20,324 KB
testcase_10 AC 111 ms
20,308 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 1,246 ms
20,136 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require "openssl"

main = -> {
    MOD = 10**8
    M = gets.to_i
    N = gets.to_i
    
    p = 1
    N.times do |i|
        p *= M - i
        p /= i + 1
        p %= MOD
    end
    
    puts "%08d" % p
}

main.call
0