結果

問題 No.537 ユーザーID
ユーザー forest3
提出日時 2020-04-08 09:57:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 531 bytes
コンパイル時間 1,705 ms
コンパイル使用メモリ 174,728 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-18 06:21:51
合計ジャッジ時間 5,574 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

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

	long long ans = 0;
	set<string> st;
	for( int x = 1; x * x <= N; x++ ) {
		if( N % x ) continue;
		char s1[16], s2[16];
		sprintf( s1, "%d", x );
		sprintf( s2, "%d", N / x );
		if( st.find( string( s1 ) + string( s2 ) ) == st.end() ) {
			ans++;
			st.insert( string( s1 ) + string( s2 ) );
		}
		if( st.find( string( s2 ) + string( s1 ) ) == st.end() ) {
			ans++;
			st.insert( string( s2 ) + string( s1 ) );
		}
	}

	cout << ans << endl;
}
0