結果

問題 No.673 カブトムシ
ユーザー AEn
提出日時 2022-06-22 00:51:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,196 KB
実行使用メモリ 53,460 KB
最終ジャッジ日時 2024-10-15 02:55:45
合計ジャッジ時間 1,799 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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