#include #include using namespace std; bool readInput(long *res){ // cerr << "readInput start" << endl; if(cin >> res[0]){ return cin >> res[1]; }return false; } int main(){ long *arr = new long[2]; long count = 0; while(readInput(arr)){ // cerr << "while in" << endl; count = 0; long k = arr[1]; long n = arr[0]; long a = 1; long b = 1; for(long i = 1;i<=k;i++){ b = b*(i); a = a*(n-i+1); } //cerr << b; long c = a/b; double c_sqrt = sqrt(static_cast(c)); for(long i = 1;i < static_cast(c_sqrt)+1; i++){ if(c%i==0)count+=2; } if(c_sqrt - static_cast(c_sqrt)==0)count++; cout << count << endl; } return 0; }