結果

問題 No.1616 Joke
ユーザー sorag
提出日時 2022-07-19 19:31:50
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 581 ms
コンパイル使用メモリ 69,656 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-01 23:00:45
合計ジャッジ時間 1,507 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 12 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
using namespace std;
int main() {
	int n;
	int sum = 0, re = 0;
	cin >>n;
	vector<int> a(n);
	for (int i=1; i <= n; i++) {
		if (n % i == 0)	a[i] = i;
		sum += a[i];
	}
	re = sum / n;
	cout << sum / re << endl;
	return 0;
}
0