結果
| 問題 |
No.888 約数の総和
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2024-09-25 23:14:30 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 331 bytes |
| コンパイル時間 | 1,885 ms |
| コンパイル使用メモリ | 192,104 KB |
| 最終ジャッジ日時 | 2025-02-24 12:38:17 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 TLE * 1 -- * 14 |
ソースコード
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll n, ok=0;
int main()
{
cin.tie(0)->sync_with_stdio(0);
cin >> n;
for(int i=1; i*i<=n; ++i)
{
if(n%i==0)
{
ok += i + n/i;
}
}
ll k = sqrt(n);
if(k*k == n) {ok -= k;}
cout << ok;
return 0;
}
vjudge1