結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2017-07-01 00:45:06 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 1,384 bytes |
コンパイル時間 | 1,356 ms |
コンパイル使用メモリ | 167,408 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 23:12:14 |
合計ジャッジ時間 | 2,344 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
# include <bits/stdc++.h> # define FOR(i,a,b) for (int i=(a);i<(b);i++) # define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) # define REP(i, n) for (int i = 0; i < (int)(n); i++) # define RREP(i,n) for (int i=(n)-1;i>=0;i--) # define int(x) int x; scanf("%d",&x); # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]); # define string(x) string x; cin >> x; using namespace std; namespace utils{ template <typename T> void print(vector<vector<T>> mat) { REP (i, mat.size()) { REP (j, mat[0].size()) cout << mat[i][j] << ' '; cout << endl; } } template <typename T> void print(vector<T> v) { REP (i, v.size()) if (i >= v.size()-1) cout << v[i]; else cout << v[i] << ' '; cout << endl; } template <typename T> pair<T, T> shape(vector<vector<T>> mat) { int d1, d2; d1 = mat.size(); if (d1 > 0) d2 = mat[0].size(); else int d2 = 0; cout << "(" << d1 << ", " << d2 << ")" << endl; return make_pair(0, 0); } template <typename T> vector<vector<T>> empty(int n, int m) { vector<vector<T>> mat(n, vector<T>(m)); return mat; } } int main() { long long n; cin >> n; set<string> st; FOR(i,1,sqrt(n)+1){ if( (n % i) == 0){ string a = to_string(n / i); st.insert(a + to_string(i)); st.insert(to_string(i) + a); } } cout << st.size() << endl; }