結果

問題 No.673 カブトムシ
ユーザー cielciel
提出日時 2018-04-18 01:45:40
言語 Ruby
(3.2.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 85 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 11,248 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2023-09-12 18:21:50
合計ジャッジ時間 2,653 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 79 ms
15,080 KB
testcase_03 AC 76 ms
15,296 KB
testcase_04 AC 78 ms
15,240 KB
testcase_05 AC 77 ms
15,148 KB
testcase_06 AC 77 ms
15,240 KB
testcase_07 AC 76 ms
15,152 KB
testcase_08 AC 76 ms
15,176 KB
testcase_09 AC 76 ms
15,148 KB
testcase_10 AC 77 ms
15,256 KB
testcase_11 AC 78 ms
15,144 KB
testcase_12 AC 77 ms
15,184 KB
testcase_13 AC 76 ms
15,132 KB
testcase_14 AC 77 ms
15,096 KB
testcase_15 AC 77 ms
15,156 KB
testcase_16 AC 78 ms
15,248 KB
testcase_17 AC 77 ms
15,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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