結果

問題 No.537 ユーザーID
ユーザー newlife171128
提出日時 2018-02-16 22:19:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 880 bytes
コンパイル時間 1,603 ms
コンパイル使用メモリ 167,616 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 02:21:46
合計ジャッジ時間 2,278 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 11 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include "bits/stdc++.h"
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <map>
#include <unordered_map>
#include <string.h>
#include <utility>

typedef long long ll;
const int INF = 1e8;

#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;

typedef pair<int, int> P;

set<string> ans;

string int_to_string(ll x) {
	stringstream ss;

	ss << x;

	return ss.str();
}

void calc(int x) {

	string a, b;
	for (int i = 1; i * i <= x; i++) {
		if (x % i == 0) {

			a = int_to_string(i);

			if (i != x / i) {
				b = int_to_string(x / i);
			}

			ans.insert(a + b);
			ans.insert(b+a);
		}

	}

}
int main() {

	ll n = 0;
	cin >> n;

	calc(n);

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

	return 0;
}
0