結果
問題 |
No.2417 Div Count
|
ユーザー |
![]() |
提出日時 | 2023-08-21 14:52:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 419 ms |
コンパイル使用メモリ | 41,472 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-15 03:32:11 |
合計ジャッジ時間 | 1,913 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 41 |
ソースコード
/* -*- coding: utf-8 -*- * * 2417.cc: No.2417 Div Count - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { ll n, k; scanf("%lld%lld", &n, &k); n -= k; int c = 0; for (ll p = 1; p * p <= n; p++) if (n % p == 0) { ll q = n / p; if (p > k) c++; if (q != p && q > k) c++; } printf("%d\n", c); return 0; }