結果
問題 | No.888 約数の総和 |
ユーザー |
![]() |
提出日時 | 2020-07-28 17:37:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 254 bytes |
コンパイル時間 | 1,866 ms |
コンパイル使用メモリ | 192,124 KB |
最終ジャッジ日時 | 2025-01-12 07:15:39 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n; cin>>n; ll ans=0; for(ll i=1;i*i<=n;i++){ if(n%i==0){ ans+=i; if(n/i!=i)ans+=n/i; } } cout<<ans<<endl; }