結果
問題 |
No.888 約数の総和
|
ユーザー |
![]() |
提出日時 | 2024-09-26 23:20:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 1,819 ms |
コンパイル使用メモリ | 192,704 KB |
最終ジャッジ日時 | 2025-02-24 12:58:17 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long ll tongUocSo(ll N) { ll tong = 0; for (ll i = 1; i * i <= N; i++) { if (N % i == 0) { tong += i; if(i != N / i) tong += N / i; } } return tong; } int main() { ll N; cin >> N; cout << tongUocSo(N) << '\n'; return 0; }