結果

問題 No.537 ユーザーID
ユーザー Naoyk1212Naoyk1212
提出日時 2017-07-17 01:26:22
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 654 ms
コンパイル使用メモリ 69,576 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 22:46:33
合計ジャッジ時間 1,845 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<utility>
#include<vector>
#include<complex>

int main(){
	long long n;
	std::cin >> n;

	std::vector<std::pair<long long, long long> > v;
	int cnt = 0;
	for(int i = 1; i <= sqrt(n); i++){
		if(n % i == 0)v.push_back(std::make_pair(i, n / i));

		if(n / i == i)cnt++;
	}
	
	std::cout << v.size() * 2 - cnt << std::endl;


}
0