結果

問題 No.537 ユーザーID
ユーザー mMqrMruYrNII4Td
提出日時 2017-06-30 23:01:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 1,049 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 66,328 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-10-04 21:03:37
合計ジャッジ時間 4,529 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 2 WA * 12 RE * 1 TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
using namespace std;
#define FOR(i,a,b) for (ll i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
long gcd(long a, long b){
if (a%b==0){
return b;
}
else{
return gcd(b,a%b);
}
}
long lcm(long a, long b){
return (a*b) / gcd(a,b);
}
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a < b) { a = b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long ll;
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;
ll y[100000009];
int main(){
ll n;
cin >> n;
ll sum = 0;
FOR(i,1,n){
if (n%i == 0){
int f = 0;
REP(j,sum){
if (n/i == y[j]){
f++;
break;
}
}
if (f == 0){
y[sum] = i;
sum++;
}
}
}
if (n/y[sum-1] == y[sum]) cout << sum*2-1 << endl;
else cout << sum*2 << endl;
return 0;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0