結果

問題 No.673 カブトムシ
コンテスト
ユーザー V_Melville
提出日時 2026-11-20 23:19:01
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
RE  
実行時間 -
コード長 356 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,754 ms
コンパイル使用メモリ 379,328 KB
実行使用メモリ 9,904 KB
最終ジャッジ日時 2026-11-20 23:19:13
合計ジャッジ時間 7,364 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;

using namespace std;
using ll = long long;
using mint = modint1000000007;

int main() {
    ll b, c, d;
    cin >> b >> c >> d;
    
    mint ans;
    if (c == 1) ans = mint(b)*d;
    else ans = mint(b)*c*(mint(c).pow(d)-1)/(c-1);
    cout << ans.val() << '\n';
    
    return 0;
}
0