結果

問題 No.888 約数の総和
ユーザー vjudge1
提出日時 2025-07-07 22:37:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 1,625 ms
コンパイル使用メモリ 161,812 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-07-07 22:37:29
合計ジャッジ時間 2,929 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
long long i,a[1000001],snt[1000001],j=0,n,k,b,c,h,p,d;
int main() {
    ios::sync_with_stdio(false);
   cin.tie(0);
cin>>n;
for (i=1;i<=sqrt(n);i++){
if (n%i==0){
j+=i;
if (i!=n/i)
j+=n/i;
}
}
cout<<j;
}
0