結果
| 問題 |
No.537 ユーザーID
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-26 19:14:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 2,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 1,141 ms |
| コンパイル使用メモリ | 82,464 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 11:21:42 |
| 合計ジャッジ時間 | 2,617 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main(){
long long n;cin>>n;
vector<string> R;
for(long long i = 1; n >= i*i; i++){
if(!(n%i)){
string A = to_string(i);
string B = to_string(n/i);
R.push_back(A+B);
R.push_back(B+A);
}
}
sort(R.begin(),R.end());
R.erase(unique(R.begin(),R.end()),R.end());
cout << R.size() << endl;
}