結果
問題 | No.537 ユーザーID |
ユーザー |
![]() |
提出日時 | 2017-07-17 01:47:35 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 133 ms / 2,000 ms |
コード長 | 739 bytes |
コンパイル時間 | 740 ms |
コンパイル使用メモリ | 72,024 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 04:55:16 |
合計ジャッジ時間 | 2,117 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include<iostream>#include<utility>#include<vector>#include<complex>#include<string>int main(){long long n;std::cin >> n;std::vector<std::string> v;std::string str, str1;for(int i = 1; i <= sqrt(n); i++){if(n % i == 0){str = std::to_string(i) + std::to_string(n / i);str1 = std::to_string(n / i) + std::to_string(i);std::cerr << str << " " << str1 << std::endl;bool find = false;for(int i = 0; i < v.size(); i++){if(find)break;if(str == v[i])find = true;}if(!find)v.push_back(str);find = false;for(int i = 0; i < v.size(); i++){if(find)break;if(str1 == v[i])find = true;}if(!find)v.push_back(str1);}}std::cout << v.size() << std::endl;}