結果

問題 No.537 ユーザーID
ユーザー nksk38nksk38
提出日時 2017-07-01 08:41:22
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 732 bytes
コンパイル時間 1,108 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-05 03:19:19
合計ジャッジ時間 2,228 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>

#define mod 1000000007;

using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pr;

ll N;
set<string> key;

ll getDivisor(ll n) {
	vector<ll> v;
	for (ll i = 1; i*i <= n; i++) {
		if (n % i == 0) {
			v.push_back(i);
			if (i != n / i) {  
				v.push_back(n / i);
			}
			string s = to_string(i)+to_string(n/i);
			key.insert(s);
			s = to_string(n / i) + to_string(i);
			key.insert(s);
		}
	}
	return key.size();
}

int main()
{
	cin >> N;
	string s = to_string(N);

	cout << getDivisor(N) << endl;
	
	return 0;
}
0