結果
| 問題 |
No.537 ユーザーID
|
| コンテスト | |
| ユーザー |
newlife171128
|
| 提出日時 | 2018-02-16 22:22:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 890 bytes |
| コンパイル時間 | 1,436 ms |
| コンパイル使用メモリ | 167,716 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 02:30:41 |
| 合計ジャッジ時間 | 2,505 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 17 |
ソースコード
#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) {
for (int i = 1; i * i <= x; i++) {
string a="", b="";
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;
}
newlife171128