結果

問題 No.537 ユーザーID
ユーザー silopysilopy
提出日時 2019-08-11 21:25:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 354 bytes
コンパイル時間 706 ms
コンパイル使用メモリ 77,300 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 01:57:39
合計ジャッジ時間 2,048 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<string>
#include<set>
using namespace std;
using lint=int64_t;

int main()
{
	lint N;
	cin >> N;

	set<string> s;
	for(lint i=1;i*i<=N;i++)
	{
		string n1,n2;
		if(N%i==0)
		{
			n1=to_string(i);
			n2=to_string(N/i);
			s.insert(n1+n2);
			s.insert(n2+n1);
		}
	}

	cout << s.size() << endl;
	return 0;
}
0