結果

問題 No.673 カブトムシ
ユーザー AEnAEn
提出日時 2022-06-22 00:51:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 71,568 KB
最終ジャッジ日時 2023-08-05 05:05:58
合計ジャッジ時間 2,862 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 68 ms
71,404 KB
testcase_03 AC 73 ms
71,428 KB
testcase_04 AC 71 ms
71,400 KB
testcase_05 AC 68 ms
71,172 KB
testcase_06 AC 73 ms
71,524 KB
testcase_07 AC 68 ms
71,564 KB
testcase_08 AC 71 ms
71,308 KB
testcase_09 AC 70 ms
71,524 KB
testcase_10 AC 68 ms
71,296 KB
testcase_11 AC 68 ms
71,244 KB
testcase_12 AC 73 ms
71,400 KB
testcase_13 AC 68 ms
71,568 KB
testcase_14 AC 70 ms
71,320 KB
testcase_15 AC 72 ms
71,344 KB
testcase_16 AC 67 ms
71,484 KB
testcase_17 AC 75 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

B,C,D=map(int,input().split())
mod=10**9+7
print((D*B)%mod) if C==1 else print(((B*(pow(C, D, mod)-1)*pow(C-1, mod-2, mod))%mod+B*pow(C, D, mod)-B)%mod)
0