ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1402. Cocktails

WA 13! PLS HELP!
Posted by bani4ka 30 Aug 2008 20:03
#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    //if(n==1) { cout << 0 << endl; return 0; }
    unsigned long long p,s=0;
    for(int i=2;i<=n;i++)
    {
            p=1;
            for(int j=n;j>=n-i+1;j--) p*=j;
            s+=p;
            cout << p << " ";
    }
    cout << endl;
    cout << s << endl;
    //system("Pause");
    return 0;
}


Edited by author 30.08.2008 20:06

Edited by author 30.08.2008 20:08
Re: WA 13! PLS HELP!
Posted by ghostfreak 3 Jul 2009 18:56
test 13 is n=21
Re: WA 13! PLS HELP!
Posted by 902 group (RAU) 26 Nov 2009 14:33
test 13 is 21
the correct answer is 4131306270
Re: WA 13! PLS HELP!
Posted by Atbasar(GBK) 9 Jan 2010 20:08
Calculate it yourself
Re: WA 13! PLS HELP!
Posted by dAFTc0d3r [Yaroslavl SU] 30 Mar 2010 12:04
N = 21
ANS = 138879579704209680000 =)