結果

問題 No.537 ユーザーID
ユーザー sggkshio
提出日時 2018-03-30 01:27:13
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 1,104 bytes
コンパイル時間 841 ms
コンパイル使用メモリ 93,672 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 00:17:33
合計ジャッジ時間 2,043 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
using namespace std;

//#include<bits/stdc++.h>


int main() {
	
	long long int n;
	cin >> n;
	long long int a = 0;
	set<string>f;
	for(long long int i=1;i*i<=n;i++){

		if (n%i == 0) {
			long long int x = n/i,y=i;
			long long int t = 1,r=1;
			while (x) {
				x /= 10;
				t*=10;
			}

			while (y) {
				y /= 10;
				r*=10;
			}
			stringstream ss;
			ss << (n / i)*r + i;
			string h = ss.str();
			f.insert(h);
			//cout << h<<endl;
			stringstream sss;sss<< i*t + (n / i);
			h = sss.str();
			f.insert(h);
			//cout << h << endl;
			/*
			if (!f[(n / i)*r + i])a++;f[(n / i)*r + i] = 1; 
			if (!f[i*t + (n / i)])a++;
			f[i*t + (n / i)] = 1;
			*/
		//	cout << (n / i)*r + i << " "<< i*t + (n / i)<<endl;
		}
	
	
	}
	

	cout << f.size() << endl;

	return 0;
}
0