I'm glad. Good luck with the rest of your submissions!

Code Jam team, this must be such a common error. Is there any way you can
add a special kind of failure for Java programs written with the wrong
class name?

On Mon, Mar 9, 2020 at 11:17 AM Devi Prasad <[email protected]> wrote:

> Thank you very much. Code got accepted. I guess, I need to name all my
> classes to Solution.
> With regards
>
> R S DEVI PRASAD
>
>
> On Mon, Mar 9, 2020 at 10:22 PM Bartholomew Furrow <[email protected]>
> wrote:
>
>> I owe you an apology -- getting the length of N seemed like such a weird
>> thing to do, that I assumed it was a rookie programming error. I hadn't
>> checked the problem to see that it was, in fact, totally reasonable.
>>
>> Rename your class to Solution and you should be fine.
>>
>> On Mon, Mar 9, 2020 at 10:36 AM reachdevi1993 <[email protected]>
>> wrote:
>>
>>> Hi Bartholomew,
>>> Actually that is what I want to do.
>>> Ex. Suppose n = 104. Then I want to check each character of n, I will
>>> check if n is 4 or not. If it is 4, I will split it into two characters (2,
>>> 2) and put it in the character array's that index.
>>> Thus as per my code, a should be 102 and b should be 2.
>>>
>>> I read the analysis of this problem. And this solution was suggested.
>>> But seems like it is not working for me.
>>>
>>> On Monday, 9 March 2020 21:02:31 UTC+5:30, Bartholomew Furrow wrote:
>>>>
>>>> You're taking the length of the string that contains *n*, and
>>>> making an array of that size.
>>>>
>>>> So if n is 100, you're taking the length of the string "100" and making
>>>> an array of size 3.
>>>>
>>>> You want int n = Integer.parseInt(reader.readLine());
>>>>
>>>> Or better still:
>>>> Scanner s = new Scanner(System.in);
>>>> int n = s.nextInt();
>>>>
>>>> On Mon, Mar 9, 2020 at 8:55 AM reachdevi1993 <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Collin,
>>>>> The char arrays size cannot be set as n, because n is a string. Thus,
>>>>> I am taking its length and creating an array of that size.
>>>>>
>>>>> On Thursday, 5 March 2020 19:12:27 UTC+5:30, Collin Pearce wrote:
>>>>>>
>>>>>> Make the char arrays size n, not n.length
>>>>>
>>>>> --
>>>>> 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/74fb5957-9da6-4316-a2cb-cb376a0a5ec1%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/google-code/74fb5957-9da6-4316-a2cb-cb376a0a5ec1%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/664331e2-1784-460f-a537-8448e62c3afb%40googlegroups.com
>>> <https://groups.google.com/d/msgid/google-code/664331e2-1784-460f-a537-8448e62c3afb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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/CAHaiWHN3wwjiYO_nhgZYJQ7ejAE5MR0AYOJQ2Dk%3DH_7YDW9ZEQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/google-code/CAHaiWHN3wwjiYO_nhgZYJQ7ejAE5MR0AYOJQ2Dk%3DH_7YDW9ZEQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAD9kG4ycOD2thsULW_7dSEVamuuWcUWJah7QRsDd%3DPsXgsu%2B0g%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-code/CAD9kG4ycOD2thsULW_7dSEVamuuWcUWJah7QRsDd%3DPsXgsu%2B0g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAHaiWHOdcMKkaob5JTPysBrE0s6jCkz75uB%2B5139Gnj5m9JETA%40mail.gmail.com.

Reply via email to