結果
| 問題 |
No.2351 Butterfly in Summer
|
| コンテスト | |
| ユーザー |
3mEhsfd8aG5jx2t
|
| 提出日時 | 2023-06-16 22:10:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 402 bytes |
| コンパイル時間 | 4,260 ms |
| コンパイル使用メモリ | 251,484 KB |
| 最終ジャッジ日時 | 2025-02-14 06:01:54 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;
using mint = atcoder::modint998244353;
int main() {
int N, K;
cin >> N >> K;
cout << (mint(N) * mint(K) * mint(K - 1) / mint(K).pow(N)).val() << endl;
cerr << (mint(N) * mint(K) * mint(K - 1)).val() << endl;
cerr << mint(K).pow(N).val() << endl;
}
3mEhsfd8aG5jx2t