結果

問題 No.673 カブトムシ
ユーザー cielciel
提出日時 2018-04-18 01:47:37
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 83 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 15,404 KB
最終ジャッジ日時 2023-09-09 11:13:08
合計ジャッジ時間 2,423 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 77 ms
15,160 KB
testcase_03 RE -
testcase_04 AC 77 ms
15,236 KB
testcase_05 AC 76 ms
15,240 KB
testcase_06 RE -
testcase_07 AC 77 ms
15,264 KB
testcase_08 AC 77 ms
15,168 KB
testcase_09 RE -
testcase_10 AC 76 ms
15,024 KB
testcase_11 AC 77 ms
15,244 KB
testcase_12 AC 76 ms
14,976 KB
testcase_13 AC 76 ms
15,244 KB
testcase_14 AC 76 ms
14,996 KB
testcase_15 AC 75 ms
15,072 KB
testcase_16 AC 77 ms
15,204 KB
testcase_17 AC 76 ms
15,224 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

b,c,d=gets.split.map &:to_i
p (c<2?b*d:b*c*~-c.pow(d,m=10**9+7)*(c-1).pow(m-2,m))%m
0