結果
| 問題 |
No.537 ユーザーID
|
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2017-07-03 21:16:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 722 bytes |
| コンパイル時間 | 1,072 ms |
| コンパイル使用メモリ | 103,956 KB |
| 実行使用メモリ | 159,616 KB |
| 最終ジャッジ日時 | 2024-10-05 12:42:47 |
| 合計ジャッジ時間 | 21,623 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 16 TLE * 8 |
ソースコード
#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;
map<string, int> m;
long long int cnt = 0;
for(long long int i=1; i<=sqrt(n); i++){
if( n % i == 0 && n/i == i ) cnt-=1;
if( n % i == 0 ) cnt+=2;
m[ to_string(n%i)+to_string(n/i) ]++;
if( m[ to_string(n%i)+to_string(n/i) ] != 1 ) cnt--;
m[ to_string(n/i)+to_string(n%i) ]++;
if( m[ to_string(n/i)+to_string(n%i) ] != 1 ) cnt--;
}
cout << cnt << endl;
return 0;
}
// EOF
Yut176