On Saturday, April 13, 2019 at 12:31:48 PM UTC+9, عرفان آذری راد wrote: > On Thursday, April 11, 2019 at 6:20:32 PM UTC+4:30, [email protected] wrote: > > I don't use JS, but unless js doesn't use unlimited integer by natural, > > it's probably parsing problem since the input can be very big, going over > > range of int type. > > > > Adding character each time shouldn't be a problem. Max value 10^100 means > > it's string representation can have at most 101 length. Even if algorithm > > is O(N^2), it won't get too big. Also the reason program failed is WA, not > > TLE. > > so you mean the reason might be the limitation of numbers in js so that after > the max exceed, the numbers (i in for loop) are not increasing anymore? > I don't think 10^100 go out of range in js
In your code, I took a look at 'parseInt(a)).toString()' and parseInt(N)-parseInt(a) part. In hidden set, input can go up to 10^100. If the input is 4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444(10^99 < hundred 4s < 10^100), the correct result should be Case #1: 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 but your program will show Case #1: 2.222222222222222e+99 2.222222222222222e+99 -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/84270d2d-fe59-40ac-b590-431afaca6209%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
