結果
| 問題 | 
                            No.1616 Joke
                             | 
                    
| コンテスト | |
| ユーザー | 
                             naohS
                         | 
                    
| 提出日時 | 2021-07-22 21:24:13 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,106 bytes | 
| コンパイル時間 | 765 ms | 
| コンパイル使用メモリ | 88,244 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-17 16:13:24 | 
| 合計ジャッジ時間 | 1,342 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | WA * 13 | 
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <tuple>
#include <cstdio>
#include <cmath>
#include <bitset>
//#include <atcoder/all>
#define ll long long
#define rep(i, n) for(ll i = 0; i < n; i++)
using namespace std;
//using namespace atcoder;
const ll INF = 1e18;
/*
ll gcd(ll a, ll b){
	//log max(a,b)
	if (a % b == 0){
		return(b);
	}
	else{
		return(gcd(b, a % b));
	}
}
ll lcm(ll a, ll b){
	return a * b / gcd(a, b);
}
*/
//gcd lcm
/*
class UnionFind {
public:
	vector<ll> par;
	void init(ll sz) {
		par.resize(sz, -1);
	}
	ll root(ll pos) {
		if (par[pos] == -1) return pos;
		par[pos] = root(par[pos]);
		return par[pos];
	}
	void unite(ll u, ll v) {
		u = root(u); v = root(v);
		if (u == v) return;
		par[u] = v;
	}
	bool same(ll u, ll v) {
		if (root(u) == root(v)) return true;
		return false;
	}
};
*/
typedef pair<ll, ll> P;
int main() {
	int n;
	cin >> n;
	int ans = 0;
	for (int i = 1; i <= n;i++) {
		if (n % i == 0) ans += i;
	}
	cout << ans << endl;
}
            
            
            
        
            
naohS