結果
| 問題 |
No.1573 Divisor Function
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-27 13:32:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 692 bytes |
| コンパイル時間 | 2,754 ms |
| コンパイル使用メモリ | 180,220 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-06-25 11:26:03 |
| 合計ジャッジ時間 | 5,930 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | -- * 43 |
ソースコード
//GIVE ME AC!!!!!!!!!!!!!!!!!
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod=998244353;
int64_t read_int() {
int64_t ret = 0, sgn = 1;
int ch = getchar_unlocked();
while (isspace(ch)) { ch = getchar_unlocked(); }
if (ch == '-') { sgn = -1; ch = getchar_unlocked(); }
for (; isdigit(ch); ch = getchar_unlocked())
ret = (ret * 10) + (ch - '0');
ungetc(ch, stdin);
return sgn * ret;
}
int main(){
ll n=read_int(),m=read_int();
ll ans=0;
for(ll i=1;i<=m;i++){
ans+=n/i*i+(n/i)*(n/i+1)/2*i;
ans%=mod;
}
cout<<ans<<endl;
}