update
This commit is contained in:
parent
07fbff672e
commit
09afebc7df
@ -2,8 +2,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
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<<NV(fact(0))<<'\n'<<NV(fact(3))<<'\n';
|
||||
@ -27,6 +26,7 @@ int main(){
|
||||
|
||||
for(ull i {0};i<t;i++){
|
||||
std::cin>>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++;
|
||||
|
Loading…
Reference in New Issue
Block a user