結果

問題 No.673 カブトムシ
ユーザー H3PO4H3PO4
提出日時 2020-11-10 18:51:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 172 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 7,924 KB
最終ジャッジ日時 2023-09-30 00:07:09
合計ジャッジ時間 1,500 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 13 ms
7,780 KB
testcase_03 AC 12 ms
7,768 KB
testcase_04 AC 12 ms
7,916 KB
testcase_05 AC 12 ms
7,720 KB
testcase_06 AC 13 ms
7,740 KB
testcase_07 AC 13 ms
7,788 KB
testcase_08 AC 13 ms
7,788 KB
testcase_09 AC 12 ms
7,740 KB
testcase_10 AC 13 ms
7,784 KB
testcase_11 AC 12 ms
7,924 KB
testcase_12 AC 13 ms
7,836 KB
testcase_13 AC 13 ms
7,788 KB
testcase_14 AC 13 ms
7,716 KB
testcase_15 AC 12 ms
7,840 KB
testcase_16 AC 13 ms
7,724 KB
testcase_17 AC 13 ms
7,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 1000000007

B, C, D = map(int, input().split())
if C == 1:
    ans = B * D
else:
    ans = B * (pow(C, D+1, MOD) - 1) * pow(C - 1, -1, MOD) - B
ans %= MOD
print(ans)
0