結果
| 問題 |
No.3364 Push_back Operation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-17 22:32:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 746 ms |
| コンパイル使用メモリ | 65,528 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2025-11-17 22:33:00 |
| 合計ジャッジ時間 | 5,892 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 50 RE * 3 |
ソースコード
#include<iostream>
#include<cassert>
#include<atcoder/modint>
using namespace std;
using mint=atcoder::modint998244353;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
long N;cin>>N;
long L=1;
mint ans=0;
while(L<=N)
{
long q=N/L;
long rL=N/q;
if(q==1)ans+=rL-L+1;
else ans+=mint(q).pow(L)*(mint(q).pow(rL-L+1)-1)/(q-1);
L=rL+1;
}
cout<<ans.val()<<endl;
}