結果

問題 No.2417 Div Count
ユーザー maple_1016maple_1016
提出日時 2023-08-12 13:51:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,173 bytes
コンパイル時間 2,838 ms
コンパイル使用メモリ 182,752 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-30 04:16:20
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 WA -
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 WA -
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 WA -
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 3 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
testcase_32 AC 5 ms
5,376 KB
testcase_33 AC 3 ms
5,376 KB
testcase_34 AC 3 ms
5,376 KB
testcase_35 AC 7 ms
5,376 KB
testcase_36 AC 5 ms
5,376 KB
testcase_37 AC 5 ms
5,376 KB
testcase_38 AC 12 ms
5,376 KB
testcase_39 AC 6 ms
5,376 KB
testcase_40 AC 4 ms
5,376 KB
testcase_41 AC 4 ms
5,376 KB
testcase_42 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define reps(i,n) for(ll i=1;i<=(n);++i)
#define repr(i,n) for(ll i=2;i*i<=(n);++i)
#define ll long long
#define all(x) (x).begin(),(x).end()
#define sz(x) ((string)(x).size())
#define pb push_back
#define pob pop_back()
#define MMod (ll)1000000007
#define mmod (ll)998244353
#define setp(x) setprecision((ll)(x))
#define INF (ll)(1000000000000000000)
#define mp make_pair
using namespace std;
using pii=pair<int, int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vc=vector<char>;
using vb=vector<bool>;
using vl=vector<long long>;
using vvi=vector<vi>;
using vvl=vector<vl>;
using vvc=vector<vc>;
using vvb=vector<vb>;
using vpi=vector<pii>;
using vpl=vector<pair<ll,ll>>;
using vs=vector<string>;
using pqi=priority_queue<int>;
vpi fs={mp(1,0),mp(-1,0),mp(0,1),mp(0,-1)};
const ll inf=1e18;

int main(){
    ll n,k; cin>>n>>k;
    n-=k;
    ll sum=0;
    for(ll i=1;i*i<=n;++i) {
        if(n%i==0&&i>k) sum++;
        if(n%i==0&&n/i>k) sum++;
        if(i*i==n) sum--;
    }
    cout<<sum<<endl;
  return 0;
}
0