結果
| 問題 |
No.2417 Div Count
|
| コンテスト | |
| ユーザー |
LaFolia13
|
| 提出日時 | 2023-07-29 16:24:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 538 bytes |
| コンパイル時間 | 1,750 ms |
| コンパイル使用メモリ | 166,740 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-08 02:55:53 |
| 合計ジャッジ時間 | 3,371 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 4 WA * 37 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using llong = long long;
using ldbl = long double;
using lpair = pair<llong, llong>;
#define ALL(x) x.begin(), x.end()
constexpr llong mod = 1e9+7;
constexpr llong inf = mod * mod;
int main() {
llong N, K;
cin >> N >> K;
llong Ax = N - K;
llong ans = -(K != 0);
for (llong i = 1; i * i <= Ax; i++) {
if (Ax % i == 0) {
cerr << i << " " << Ax / i << endl;
ans += 2;
if (i * i == Ax) {
ans--;
}
}
}
cout << ans << endl;
return 0;
}
LaFolia13