diff --git a/src/P2822/P2822.cpp b/src/P2822/P2822.cpp index 2c752fd..2a2f56a 100644 --- a/src/P2822/P2822.cpp +++ b/src/P2822/P2822.cpp @@ -2,8 +2,7 @@ #include using ull = unsigned long long; - -static ull t, k, n, m, ans; +#define NV(v)#v<<" : "<<(v) static constexpr ull fact(const ull n)noexcept{ if(n==0)return 1; @@ -18,7 +17,7 @@ static constexpr ull C(const ull n, const ull m)noexcept{ return fact(n)/(fact(m)*fact(n-m)); } -#define NV(v)#v<<" : "<<(v) +static ull t, k, n, m, ans; int main(){ // std::cout<>n>>m; + ans = 0; for(ull i {0};i<=n;i++){ for(ull j{0};j<=std::min(i,m);j++){ if(C(i,j)%k==0)ans++;