結果

問題 No.673 カブトムシ
ユーザー cielciel
提出日時 2018-04-18 01:50:42
言語 Ruby
(3.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 83 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 11,276 KB
実行使用メモリ 15,268 KB
最終ジャッジ日時 2023-09-12 18:23:15
合計ジャッジ時間 3,609 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 80 ms
15,244 KB
testcase_03 AC 79 ms
15,056 KB
testcase_04 AC 80 ms
15,144 KB
testcase_05 AC 79 ms
15,108 KB
testcase_06 AC 78 ms
15,092 KB
testcase_07 AC 79 ms
15,092 KB
testcase_08 AC 79 ms
15,008 KB
testcase_09 AC 78 ms
15,108 KB
testcase_10 AC 78 ms
15,168 KB
testcase_11 AC 79 ms
15,144 KB
testcase_12 AC 78 ms
15,060 KB
testcase_13 AC 79 ms
15,268 KB
testcase_14 AC 78 ms
15,000 KB
testcase_15 AC 78 ms
15,172 KB
testcase_16 AC 78 ms
15,216 KB
testcase_17 AC 79 ms
15,164 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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