結果
問題 |
No.2380 Sylow P-subgroup
|
ユーザー |
|
提出日時 | 2023-07-14 21:59:17 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 5,165 ms |
コンパイル使用メモリ | 307,288 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-16 06:58:12 |
合計ジャッジ時間 | 5,931 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 1 |
ソースコード
#include <bits/stdc++.h> #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif using namespace std; using ll = long long; using mint = modint998244353; int main() { ll n; int p; cin >> n >> p; int k = 0; while (n) { k += n/p; n /= p; } cout << mint(p).pow(k).val() << '\n'; return 0; }