結果
問題 |
No.537 ユーザーID
|
ユーザー |
![]() |
提出日時 | 2017-07-17 01:45:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 690 bytes |
コンパイル時間 | 806 ms |
コンパイル使用メモリ | 72,356 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-08 04:55:09 |
合計ジャッジ時間 | 2,150 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 11 |
ソースコード
#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(n / i); 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; }