結果

問題 No.537 ユーザーID
ユーザー ynymxiaolongbao
提出日時 2017-07-08 04:23:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 486 bytes
コンパイル時間 743 ms
コンパイル使用メモリ 65,928 KB
実行使用メモリ 13,632 KB
最終ジャッジ日時 2024-10-06 11:36:12
合計ジャッジ時間 4,225 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<set>
using namespace std;
set<string> st;
string F(long long x){
	string ret;
	while(x){
		ret.insert(ret.begin(),'0'+x%10);
		x/=10;
	}
	return ret;
}
int main(){
	long long n;
	cin>>n;
	for(int i=1;i*i<=n;i++){
		if(n%i==0){
			long long a=i,b=n/i;
			string c=F(a),d=F(b);
			//cout<<"#"<<c<<" "<<d<<endl;
			if(st.find(c+d)==st.end())st.insert(c+d);
			if(st.find(d+c)==st.end())st.insert(d+c);
		}
	}cout<<st.size()<<endl;
	return 0;
}
0