結果
問題 | No.537 ユーザーID |
ユーザー |
![]() |
提出日時 | 2019-09-30 13:38:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 480 bytes |
コンパイル時間 | 1,763 ms |
コンパイル使用メモリ | 182,396 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-03 05:11:20 |
合計ジャッジ時間 | 2,719 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef unsigned long long ull;typedef long long ll;int main(){ll n;cin >> n;ll sq=(ll)(sqrt(n));vector<string> v;if(sq*sq==n) v.push_back(to_string(sq)+to_string(sq));for(ll i=1; i*i<n; i++){if(n%i==0){v.push_back(to_string(i)+to_string(n/i));v.push_back(to_string(n/i)+to_string(i));}}sort(v.begin(), v.end());v.erase(unique(v.begin(), v.end()), v.end());cout << v.size() << endl;return 0;}