結果
| 問題 | No.888 約数の総和 |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-01-27 12:13:54 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 342 bytes |
| 記録 | |
| コンパイル時間 | 3,168 ms |
| コンパイル使用メモリ | 333,604 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-01-27 12:14:00 |
| 合計ジャッジ時間 | 4,962 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 16 |
ソースコード
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int tong(int x)
{
int t = 1;
for(int i = 2; i * i <= x; i++)
{
if(x % i == 0)
{
t += i;
if(x / i != i) t += x/i;
}
}
return t + x;
}
int main()
{
ll n;
cin >> n;
cout << tong(n);
return 0;
}
vjudge1