Page 1 of 1

Problem 932

Posted: Thu May 01, 2025 2:07 am
by QQQ82w4
I solved the problem but my result is not accepted. I need clarification on how to deal with numbers which length is odd. For example, 953832821345856 can be split to 9538328 and 21345856 so
953832821345856==(9538328+21345856)**2 => true
or to 95383282, 1345856
953832821345856==(95383282+1345856)**2 => false
Is the number 953832821345856 considerate 2025-number?
Thank you.

Re: Problem 932

Posted: Thu May 01, 2025 3:28 am
by yourmaths
There is nothing in the problem specification that says how to split a 2025-number (so long as there are no leading zeros), just that if you can find two numbers a and b that satisfy the requirements then ab is a 2025-number. So, the example you provide is a 2025-number.

Re: Problem 932

Posted: Mon May 05, 2025 12:54 am
by QQQ82w4
I solved the problem but my result is not accepted.
I used javascript and my result was not accepted. Then I rewrite code in javascript and got the same result. The same incorrect result. Then I switched to Python and the result was correct. :shock:

Re: Problem 932

Posted: Mon May 05, 2025 9:50 am
by pjt33
JavaScript's numbers are IEEE-754 double precision floating point. You have to use an additional library if you want to work with 64-bit integers.

Re: Problem 932

Posted: Mon May 05, 2025 6:15 pm
by QQQ82w4
Thank you, pjt33. I'll note this for the future.