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
Posted by Aytbaev Madiyar TKTL 16 Sep 2006 13:24
why I have wrong answer at 13 test?

Edited by author 16.09.2006 13:24
Re: wA
Posted by C2H5OH 19 Sep 2006 16:45
Because in 13th test N=21 and answer for it is greater than max(_int64). So you should calculate this value using arrays, not long or _int64 types.

You could insert

if(n==21){cout<<"138879579704209680000"<<endl;return 0;}

into your code and submit problem. Other values you could calculate using "unsigned long long"in gcc or "_int64"

Edited by author 19.09.2006 22:00

Edited by author 19.09.2006 22:01