結果

問題 No.2113 Distance Sequence 1.5
ユーザー karinohito
提出日時 2024-09-24 21:45:36
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 1,721 ms
コンパイル使用メモリ 195,580 KB
最終ジャッジ日時 2025-02-24 12:07:41
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#include<atcoder/modint>
using mint=atcoder::modint998244353;

int main(){
    ll N,M,K;
    cin>>N>>M>>K;
    cout<<(mint(M-K)*(mint(K).pow(2*N)-mint(K-1).pow(2*N))+mint(K).pow(2*N)).val()<<endl;
}
0