Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- typedef unsigned long long ull;
- ull n,m;
- ull produs(ull a,ull b){
- ull p=1;
- for(ull i=a;i<=b;i++){
- p=(p*i)%224737;
- }
- return p;
- }
- int main()
- {
- ull f1,f2,dif,k; ///k - copii, n - jucarii
- cin>>k>>n; ///A(n,k)
- dif=n-k+1;
- if(k>n) {
- cout<<0;
- return 0;
- }
- ///f1=produs(dif,n);
- ///f2=fact(n-m);
- ///cout<<f1<<endl<<f2;
- cout<<produs(dif,n);;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement