結果

問題 No.888 約数の総和
ユーザー tko919tko919
提出日時 2019-09-21 16:31:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 918 bytes
コンパイル時間 1,652 ms
コンパイル使用メモリ 169,156 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 05:27:55
合計ジャッジ時間 3,150 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
4,348 KB
testcase_01 AC 13 ms
4,348 KB
testcase_02 AC 13 ms
4,348 KB
testcase_03 WA -
testcase_04 AC 13 ms
4,348 KB
testcase_05 WA -
testcase_06 AC 13 ms
4,348 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 13 ms
4,348 KB
testcase_10 WA -
testcase_11 AC 12 ms
4,348 KB
testcase_12 AC 13 ms
4,348 KB
testcase_13 AC 13 ms
4,348 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 13 ms
4,348 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 13 ms
4,348 KB
testcase_20 WA -
testcase_21 AC 12 ms
4,348 KB
testcase_22 AC 13 ms
4,348 KB
testcase_23 WA -
testcase_24 AC 12 ms
4,348 KB
testcase_25 WA -
testcase_26 AC 13 ms
4,348 KB
testcase_27 AC 13 ms
4,348 KB
testcase_28 AC 12 ms
4,348 KB
testcase_29 WA -
testcase_30 AC 12 ms
4,348 KB
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll; typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A,size_t N,typename T>void Fill(A(&array)[N],const T &val){fill((T*)array, (T*)(array+N), val);}
const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2;
//template end



int main(){
    ll n,ans=0; scanf("%lld",&n);
    vector<ll> div;
    rep(i,1,1000010){
        if(n%i==0&&i<n/i){
            div.push_back(i);
            if(i*i!=n)div.push_back(n/i);
        }
    }
    rep(i,0,div.size())ans+=div[i];
    printf("%lld\n",ans);
    return 0;
}
0