結果
問題 | No.2351 Butterfly in Summer |
ユーザー |
|
提出日時 | 2023-06-16 21:23:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 192 bytes |
コンパイル時間 | 611 ms |
コンパイル使用メモリ | 67,012 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 12:53:33 |
合計ジャッジ時間 | 1,283 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<iostream> #include<atcoder/modint> using namespace std; using mint=atcoder::modint998244353; int main() { int N,K; cin>>N>>K; cout<<(mint(N)*(K-1)/mint(K).pow(N-1)).val()<<endl; }