結果

問題 No.537 ユーザーID
ユーザー aaaa
提出日時 2017-07-14 02:00:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 470 bytes
コンパイル時間 936 ms
コンパイル使用メモリ 72,144 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-07 18:38:48
合計ジャッジ時間 1,951 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>
#include <vector>
#include <cmath>

using namespace std;

string str(int il, int ir){
	string ret = to_string(il);
	ret += to_string(ir);
	return ret;
}

int main () {
	
	long n;
	cin >> n;
	
	set<string> myset;
	for (long i = 1; i <= static_cast<long>(sqrt(n) + 1); ++i) {
		long il = i;
		long ir = n / i;
		if (il * ir != n) continue;
		myset.insert(str(il, ir));
		myset.insert(str(ir, il));
	}
	
	cout << myset.size() << endl;
}

0