結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2017-11-25 00:27:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 533 bytes |
コンパイル時間 | 954 ms |
コンパイル使用メモリ | 82,808 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-11-27 08:52:38 |
合計ジャッジ時間 | 53,134 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 4 WA * 11 TLE * 17 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ long N; cin >> N; vector<string> answers; for(int i = 1; i * i <= 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(N)); } } 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; }