結果
問題 | No.537 ユーザーID |
ユーザー |
![]() |
提出日時 | 2020-08-29 17:14:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 1,836 ms |
コンパイル使用メモリ | 179,332 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 14:16:22 |
合計ジャッジ時間 | 3,171 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 4 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll = long long;template<class T>vector<T> divisor(T n){vector<T> res;for(T i = 1; i * i <= n; i++){if(n % i == 0){res.push_back(i);T j = n / i;if(i != j)res.push_back(j);}}sort(res.begin(),res.end());return res;}int main(){ll n; cin >> n;vector<ll> a = divisor(n);set<string> st;for(auto i : a) {int j = n / i;string si = to_string(i), sj = to_string(j);si += sj;st.insert(si);}cout << st.size() << endl;}