結果
| 問題 |
No.888 約数の総和
|
| コンテスト | |
| ユーザー |
ouoz1V
|
| 提出日時 | 2019-09-20 21:38:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 1,511 ms |
| コンパイル使用メモリ | 158,232 KB |
| 実行使用メモリ | 16,824 KB |
| 最終ジャッジ日時 | 2024-09-14 16:53:12 |
| 合計ジャッジ時間 | 7,738 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 30 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
long long int n;
long long int sum=1;
void solve(){
sum=1;
cin>>n;
for(long long int i=2; i*i<=n; i++){
if(n%i==0){
sum+=i;
sum+=(n/i);
//cout<<i<<" "<<n/i<<" "<<sum<<endl;
}
//cout<<i<<endl;
}
if(n!=1){
sum+=n;
}
cout<<sum<<endl;
}
int main(){
while(1)solve();
return 0;
}
ouoz1V