打表找规律

对于数学题,打表找规律还是非常有用的!!!!!!

#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
const int max_n= 5e5+100;
const ll mod = 998244353;
ll POW(int a,int p){
    ll base = a;
    ll ans=1;
    while (p){
        if (p&1)ans = ans*base%mod;
        base = (base*base)%mod;
        p>>=1;
    }return ans;
}
ll inv(int a){
    return POW(a,mod-2);
}
ll j[max_n];
ll C(int n,int m){
    if (n<m)return 0;
    return j[n]*inv(j[m]*j[n-m]%mod)%mod;
}
int n,k;
int main(){
    ios::sync_with_stdio(0);j[0]=1;
    cin>>n>>k;
    for (int i=1;i<=n;++i)j[i]=j[i-1]*i%mod;
    ll ans = 0;
    for (int i=1;i<=n;++i)
    ans = (ans+C(n/i-1,k-1))%mod;
    cout<<ans<<endl;
}