That is due to the way you are calculating the answer with extra whitespace 
padding. Depending on the language you are using, there should be "trim" or 
"strip" function for strings which you can use as a quick fix on the 
answer-portion after the "Case ##:" portion. Alternatively, go through your 
algorithm to prevent adding the whitespace.

On Tuesday, 7 April 2020 03:01:21 UTC+2, akshit bhatia wrote:
>
> Hello All,
>
> In one of the problems for Code Jam, I am getting the below output
>
> Case #1:    CJC
> Case #2: IMPOSSIBLE
> Case #3:      CJJCC
> Case #4:   CC
>
>
> Meanwhile, the real output should have been like this:
>
> Case #1: CJC
> Case #2: IMPOSSIBLE
> Case #3: JCCJJ
> Case #4: CC
>
>
>
> Can anyone tell how to rectify this?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/07132ee2-27bc-425d-befe-c0b62bd935ea%40googlegroups.com.

Reply via email to