616 - Coconuts, Revisited

All about problems in Volume 6. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

jjtse
Learning poster
Posts: 80
Joined: Mon Aug 22, 2005 7:32 pm
Location: Nevada, US
Contact:

Post by jjtse » Wed Nov 01, 2006 9:45 am

are you sure there is no solution for this case?


65539


My program output says 2 people and 1 monkey.


My program is not AC

jjtse
Learning poster
Posts: 80
Joined: Mon Aug 22, 2005 7:32 pm
Location: Nevada, US
Contact:

Post by jjtse » Wed Nov 01, 2006 9:55 am

Hi,

I'm wondering if someone can give some more sample inputs/output for this problem. I think my program is pretty good except maybe a few special cases.


Thanks

jjtse
Learning poster
Posts: 80
Joined: Mon Aug 22, 2005 7:32 pm
Location: Nevada, US
Contact:

Post by jjtse » Wed Nov 01, 2006 10:05 am

ram wrote:"long int" is not sufficient for longer values.

Try using "long double" instead of "long int" and "fmod" instead of "%".

Why would that even be an issue? The problem clearly says "integers" as coconuts

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Wed Nov 01, 2006 11:24 am

jjtse wrote:65539

My program output says 2 people and 1 monkey.

My program is not AC
My program was accepted, and it also says 2 people, 1 monkey.
jjtse, in http://online-judge.uva.es/board/viewtopic.php?t=104 wrote:
ram wrote:"long int" is not sufficient for longer values.

Try using "long double" instead of "long int" and "fmod" instead of "%".
Why would that even be an issue? The problem clearly says "integers" as coconuts
You know, googolplex is an integer, too ;)
So, can you tell me what is the output for it?

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Wed Nov 01, 2006 11:42 am

mf wrote:You know, googolplex is an integer, too ;)
So, can you tell me what is the output for it?
"That was a hell of a lot of coconuts for one monkey (burp!); next time I'll stick to bananas!"

hi!man!
New poster
Posts: 48
Joined: Fri Dec 29, 2006 1:26 pm

Post by hi!man! » Sat Feb 17, 2007 9:37 am

Andrey Mokhov wrote:Well you know I was lazy enough to calculate the higher limit of n, but it's clear for me that n=30 is enough. Of course it may be even too much, but I don't want to improve the limit. :lol:

Best regards.
n = 9 is enough.

brett1479
New poster
Posts: 4
Joined: Tue Nov 12, 2013 4:57 pm

Re: 616 - Coconuts, Revisited

Post by brett1479 » Mon Apr 07, 2014 12:16 am

The input test data for this problem is very weak. There are no test cases where the number of people is greater than 5.

ashik_53@diu
New poster
Posts: 1
Joined: Mon Dec 28, 2015 10:20 pm

Re: 616 - Coconuts, Revisited

Post by ashik_53@diu » Mon Dec 28, 2015 10:26 pm

check your program with input 3 :) . AC Output is 3 coconuts, 2 people and 1 monkey

Post Reply

Return to “Volume 6 (600-699)”