結果
| 問題 |
No.537 ユーザーID
|
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2017-07-03 21:23:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 718 bytes |
| コンパイル時間 | 1,092 ms |
| コンパイル使用メモリ | 102,468 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 12:43:12 |
| 合計ジャッジ時間 | 2,123 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;
int main(void) {
long long int n;
cin >> n;
vector<string> ans;
for(long long int i=1; i<=sqrt(n); i++){
if( n % i != 0 ) continue;
ans.push_back( to_string(n/i)+to_string(i) );
ans.push_back( to_string(i)+to_string(n/i) );
}
sort(ans.begin(), ans.end());
ans.push_back("aaa");
long long int cnt = 0;
for(int i=0; i<ans.size()-1; i++){
if( ans[i] != ans[i+1] ) cnt++;
}
cout << cnt << endl;
return 0;
}
// EOF
Yut176