結果

問題 No.888 約数の総和
ユーザー Ichimiya
提出日時 2020-07-24 20:34:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 1,584 ms
コンパイル使用メモリ 165,320 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-25 19:22:38
合計ジャッジ時間 2,757 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
const int64_t MOD = 1e9 + 7;

int main() {
	int64_t N;
	cin >> N;

	int64_t sum = 0;
	for (int64_t i = 1; i <= sqrt(N); i++) {
		if (N % i == 0) {
			sum += i + (N / i);
		}
	}

	cout << sum << endl;
}
0