Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
295 B
1
Indexable
Never
#include <iostream>
using namespace std;
int fak(int n){
    int ans=1;
    while(n>0){
        ans *=  n;
        n--;
    }
    return ans;
}
int main(){
    int k, n, m;
    int x=0;
    cin>>k>>n>>m;
    
    x = n - (m*k);
    
    cout<<fak(x+k-1) / (fak(x)*fak(k-1));
    
    return 0;
}
Leave a Comment