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 1261. Tips

what to output if N=1
Posted by teamSaratov 1 Aug 2006 13:37
can anyone please tell me what to output if N=1 is given?
Re: what to output if N=1
Posted by teamSaratov 1 Aug 2006 13:47
well, when I added to code:

if N=1 then begin writeln('0'); halt; end;

I've got WA on test 1.
With out such code I've got WA on test 7. So, test 1 - N=1.
But I'm not sure in correct solution:

my program outputs 4 3. But 4 can be got only like:
4 = 1 + 3;

So, then change is already included in paying. Smth strange, don't you think so?
Re: what to output if N=1
Posted by Denis Koshman 1 Aug 2008 00:42
I had WA1 with output 0 for N=1. With 4 3 I passed 1st test but failed with WA9 which is something like 12 or 81.

So, amount of tips must be POSITIVE.

Edited by author 01.08.2008 00:48
Re: what to output if N=1
Posted by Bobur 26 Oct 2008 19:34
why when n=1 answer 4 3?
i think it must be 3 2!!
Re: what to output if N=1
Posted by unlucky [Vologda SPU] 11 Feb 2010 21:58
2 can't be representeted of sum numbers(3^n, where every N can be used _1 time_).