結果
| 問題 |
No.3364 Push_back Operation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-17 11:18:33 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 578 bytes |
| コンパイル時間 | 5,141 ms |
| コンパイル使用メモリ | 335,076 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-11-17 20:49:08 |
| 合計ジャッジ時間 | 12,226 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 53 |
ソースコード
//#define //_GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <deque>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = atcoder::modint998244353;
int main(){
ll N;
cin >> N;
mint ans=0;
ll uplimit=-1;
for(ll i=1;i*i<=N;i++){
ll up=N/i;
ll down=N/(i+1);
mint a=mint(i).pow(down+1);
mint b=mint(i).pow(up-down);
ans+=a*((b-1)/(i-1));
uplimit=N/(i+1);
}
for(ll i=1;i<=uplimit;i++){
ans+=mint(N/i).pow(i);
}
cout << ans.val() << '\n';
}