結果
| 問題 |
No.3364 Push_back Operation
|
| コンテスト | |
| ユーザー |
AK_Mi
|
| 提出日時 | 2025-11-17 21:32:32 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 554 bytes |
| コンパイル時間 | 4,878 ms |
| コンパイル使用メモリ | 335,260 KB |
| 実行使用メモリ | 16,216 KB |
| 最終ジャッジ日時 | 2025-11-17 21:33:23 |
| 合計ジャッジ時間 | 8,408 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 1 TLE * 1 -- * 51 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
ll intpow(ll a, ll b) {
ll c = 1;
while (b) {
if (b & 1) c = (c * a) % 998244353;
a *= a;
a %= 998244353;
b >>= 1;
}
return c % 998244353;
}
int main(){
ll n;
cin >> n;
ll ans = 0;
for(ll i = 1; i <= n; i++){
ll a = ll(n/i) % 998244353;
ans += intpow(a,i);
ans %= 998244353;
}
cout << ans << '\n';
return 0;
}
AK_Mi