162 - Beggar My NeighBour

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

Moderator: Board moderators

Post Reply
pirituba
New poster
Posts: 2
Joined: Fri Jan 08, 2016 5:47 pm

162 - Beggar My NeighBour

Post by pirituba » Fri Jan 08, 2016 5:53 pm

Hi, I don't understand why I'm receiving Presentation Error.
My java code. Somebody can help me please?

Code: Select all

Remove AC
Tks
Last edited by pirituba on Wed Jan 13, 2016 4:38 pm, edited 1 time in total.

Zyaad Jaunnoo
Experienced poster
Posts: 122
Joined: Tue Apr 16, 2002 10:07 am

Re: 162 - Beggar My NeighBour

Post by Zyaad Jaunnoo » Wed Jan 13, 2016 4:04 pm

When you output the number of cards in the winner's hand, it should right justified in a field of width 3 (specified in the problem statement).

PS: Please do search the forum for an existing post about a problem before creating a new one.

pirituba
New poster
Posts: 2
Joined: Fri Jan 08, 2016 5:47 pm

Re: 162 - Beggar My NeighBour

Post by pirituba » Wed Jan 13, 2016 4:34 pm

Tks man, I will do this in the next post.
I found a post with a critical input and saw the problem.

When result is
0 1
My output must be
0 1 with 3 fields not two.

sya...

ahmedShawky
New poster
Posts: 3
Joined: Sat Sep 10, 2016 6:55 pm

Re: 162 - Beggar My NeighBour

Post by ahmedShawky » Sat Sep 10, 2016 7:22 pm

Hi This code gets WA even though it passed all the test cases in uDebug
http://ideone.com/LJWUWw
Note: I handeled the case where the size of the deck is less than 10 and I made right justified.
Can someone help me?

Post Reply

Return to “Volume 1 (100-199)”