結果
問題 |
No.2007 Arbitrary Mod (Easy)
|
ユーザー |
|
提出日時 | 2022-12-27 23:37:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 4,163 ms |
コンパイル使用メモリ | 251,004 KB |
最終ジャッジ日時 | 2025-02-09 21:14:50 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 10 WA * 20 |
ソースコード
#include <atcoder/all> #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace atcoder; using namespace std; using mint = modint998244353; mint modpow(ll a, ll b) { mint ans = 1; while (b) { if (b & 1) ans *= a; b >>= 1; a *= a; } return ans; } int main() { cin.tie(0)->sync_with_stdio(0); ll a, n; cin >> a >> n; cout << 998244353 << "\n"; cout << modpow(a, n).val() << "\n"; return 0; }