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