結果

問題 No.673 カブトムシ
ユーザー roarisroaris
提出日時 2019-08-19 11:00:30
言語 PyPy3
(7.3.13)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 208 bytes
コンパイル時間 1,262 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 71,384 KB
最終ジャッジ日時 2023-09-15 12:35:46
合計ジャッジ時間 3,994 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 73 ms
70,908 KB
testcase_03 AC 73 ms
71,108 KB
testcase_04 AC 73 ms
71,272 KB
testcase_05 AC 72 ms
71,116 KB
testcase_06 AC 74 ms
71,008 KB
testcase_07 AC 74 ms
71,108 KB
testcase_08 AC 74 ms
71,200 KB
testcase_09 AC 74 ms
70,760 KB
testcase_10 AC 73 ms
71,108 KB
testcase_11 AC 74 ms
70,888 KB
testcase_12 AC 73 ms
70,920 KB
testcase_13 AC 73 ms
71,216 KB
testcase_14 AC 74 ms
70,800 KB
testcase_15 AC 72 ms
70,956 KB
testcase_16 AC 73 ms
71,168 KB
testcase_17 AC 74 ms
71,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def inv(x):
    return pow(x, MOD-2, MOD)
    
B, C, D = map(int, input().split())
MOD = 10 ** 9 + 7

if C == 1:
    print(B * D % MOD)
else:
    print(((B * C * (pow(C, D, MOD) - 1)) % MOD) * inv(C-1) % MOD)
0