Problem 932

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
QQQ82w4
Posts: 3
Joined: Tue Jan 28, 2025 6:58 pm

Problem 932

Post 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.
User avatar
yourmaths
Posts: 47
Joined: Mon Aug 25, 2014 11:00 am

Re: Problem 932

Post 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.
level = lambda number_solved: number_solved // 25
Image
QQQ82w4
Posts: 3
Joined: Tue Jan 28, 2025 6:58 pm

Re: Problem 932

Post 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:
pjt33
Posts: 137
Joined: Mon Oct 06, 2008 6:14 pm

Re: Problem 932

Post 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.
QQQ82w4
Posts: 3
Joined: Tue Jan 28, 2025 6:58 pm

Re: Problem 932

Post by QQQ82w4 »

Thank you, pjt33. I'll note this for the future.
Post Reply