結果
問題 | No.2417 Div Count |
ユーザー |
![]() |
提出日時 | 2023-08-12 13:46:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 721 bytes |
コンパイル時間 | 1,750 ms |
コンパイル使用メモリ | 166,024 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 16:10:22 |
合計ジャッジ時間 | 2,739 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 41 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define rep(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)#define rrep(i, a, b) for (int i = (int)(b) - 1; (i) >= (int)(a); (i)--)#define all(v) v.begin(), v.end()typedef long long ll;template <class T> using V = vector<T>;template <class T> using VV = vector<V<T>>;int main() {ios::sync_with_stdio(false);cin.tie(nullptr);constexpr char endl = '\n';ll n,k;cin >> n >> k;n -= k;ll ans = 0;for (ll i = 1; i * i <= n; i++) {if (n % i == 0) {if (i > k) ans++;if (n / i != i && n / i > k) {ans++;}}}cout << ans << endl;return 0;}