結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2017-11-25 00:29:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 555 bytes |
コンパイル時間 | 1,365 ms |
コンパイル使用メモリ | 88,864 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 08:53:38 |
合計ジャッジ時間 | 2,349 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include <iostream>#include <algorithm>#include <vector>#include <cmath>using namespace std;int main(){long N;cin >> N;vector<string> answers;for(int i = 1; i <= sqrt(N); i++){if(N % i == 0){answers.push_back(to_string(i) + to_string(N / i));answers.push_back(to_string(N / i) + to_string(i));}}sort(answers.begin(), answers.end());int ans = 1;for(int i = 1; i < answers.size(); i++){ans += (answers[i] != answers[i - 1]);}cout << ans << endl;}