結果

問題 No.888 約数の総和
ユーザー Yug_min_null
提出日時 2021-11-11 16:12:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 349 bytes
コンパイル時間 2,081 ms
コンパイル使用メモリ 197,900 KB
実行使用メモリ 13,640 KB
最終ジャッジ日時 2024-11-22 23:00:14
合計ジャッジ時間 45,324 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 TLE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(){
  ll N; cin >> N;
  map<ll, int> mp;
  for(int i = 1; i*i <= N; i++){
    if(N%i == 0){
      mp[N/i]++;
      mp[i]++;
    }
  }
  ll ans = 0;
  for(auto p: mp){
    ans += p.first;
  }
  cout << ans << endl;
}
0