結果
問題 |
No.888 約数の総和
|
ユーザー |
![]() |
提出日時 | 2025-07-07 23:08:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 1,888 ms |
コンパイル使用メモリ | 193,956 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-07-07 23:08:50 |
合計ジャッジ時間 | 3,289 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> #define int long long using namespace std; int tongu(int x) { int s=0; for (int i=1;i*i<=x;i++) { if (x%i==0) { s+=i; if (x/i!=i) { s+=x/i; } } } return s; } signed main() { int n; cin>>n; cout<<tongu(n); return 0; }