DCP-6: Thief of deVillage!!!

Dev Skill archived problems can be discussed here.

DCP-6: Thief of deVillage!!!

by rashedul007 » Wed Jun 14, 2017 5:18 pm

I have solved the problem. And when I run it satisfies all the input samples even including the inputs in the forum. But surprisingly when I try to submit my solution it is replying 'WrongAnswer'. What is the problem?

I am printing output like: Console.WriteLine("Output: {0}",maxVal);
 
Posts: 10
Joined: Tue Jan 24, 2017 6:25 pm

Re: DCP-6: Thief of deVillage!!!

by rashedul007 » Wed Jun 14, 2017 5:37 pm

Previous error has been solved. I missed the EOF Condition while giving the testcases. Anyways that error has gone.
But now facing problem while submitting the problem. The error is showing as below:

Unhandled Exception:
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at System.Int32.Parse (System.String s, System.IFormatProvider provider) [0x00008] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at System.Convert.ToInt32 (System.String value) [0x0000b] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at Test.Main () [0x00005] in <12d939bae0ab4d26a09246d581acbe28>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at System.Int32.Parse (System.String s, System.IFormatProvider provider) [0x00008] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at System.Convert.ToInt32 (System.String value) [0x0000b] in <4dc8ec68b0964e099af86e50301f5f3c>:0
at Test.Main () [0x00005] in <12d939bae0ab4d26a09246d581acbe28>:0

But I am giving input the same way as my precedent solution. I am solving with C#. What is the problem?
 
Posts: 10
Joined: Tue Jan 24, 2017 6:25 pm


Who is online
Users browsing this forum: No registered users and 1 guest
cron