Untitled

 avatar
unknown
plain_text
a year ago
295 B
4
Indexable
#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;
}
Editor is loading...
Leave a Comment