#include using namespace std; #include #include #include #include typedef long long ll; typedef unsigned long long ull; typedef long double lb; ull combi(ull n,ull r) { ull i,j,k; ull com=1; for(i=0;i> n >> m; n /= 1000; printf("%llu\n",combi(m,n%m)); return 0; }