結果
| 問題 | No.537 ユーザーID |
| コンテスト | |
| ユーザー |
Kura
|
| 提出日時 | 2019-08-16 18:44:25 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,384 bytes |
| 記録 | |
| コンパイル時間 | 1,015 ms |
| コンパイル使用メモリ | 84,260 KB |
| 実行使用メモリ | 22,524 KB |
| 最終ジャッジ日時 | 2024-09-22 11:56:30 |
| 合計ジャッジ時間 | 5,333 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 9 TLE * 1 -- * 16 |
ソースコード
#define _USE_MATH_DEFINES//M_PI
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<iomanip>
#include<math.h>
#include<map>
#define llong long long
#define int(s) atoi(s.c_str())
#define dou(s) atof(s.c_str())
#define llo(s) atoll(s.c_str())
#define str(n) to_string(n)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define all(a) a.begin(),a.end()
#define fion(n) fixed<<setprecision(n)
#define endl '\n'
#define OR ||
#define AND &&
#define NOT !
//#define scanf scanf_s
#define lin(n) scanf("%lld",&n)
#define iin(n) scanf("%d",&n)
#define din(z) scanf("%lf",&z)
#define sin(s) cin>>s
#define input(s) getline(cin,s)
#define START int main
using namespace std;
llong fac[510000], finv[510000], inv[510000];
void cmod_init(int p = 1000000007) {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < 510000; i++) {
fac[i] = fac[i - 1] * i % p;
inv[i] = p - inv[p%i] * (p / i) % p;
finv[i] = finv[i - 1] * inv[i] % p;
}
}
int cmod(int n, int k, int p = 1000000007) {
return fac[n] * (finv[k] * finv[n - k] % p) % p;
}
START() {
llong a; lin(a);
llong old = 0;
llong ans = 0;
llong count = 0;
rep(i, 1, a + 1) {
if (i != old AND a%i == 0) {
old = i;
count++;
}
else if (i == old) {
ans++;
}
}
cmod_init();
ans += count;
cout << ans << endl;
}
Kura