HP 50g Programming Competition: How Many Partitions of an Integer in 4 Squares
|
04-15-2018, 11:42 AM
(This post was last modified: 04-15-2018 11:44 AM by Thomas Ritschel.)
Post: #9
|
|||
|
|||
RE: HP 50g Programming Competition: How Many Partitions of an Integer in 4 Squares
Here is an improved version of my earlier program.
It is still using the idea from Joe's \Gs routine, but omits the even divisors: Code: %%HP: T(3)A(R)F(.); Now it properly treats trivial inputs like 1 or 4 and works for algebraic inputs (like '720^20') as well. The runtime has also improved: 0.66 sec for 720^20 entered as 1401683395356260729391818575873415577600000000000000000000 0.69 sec for 720^20 entered as '720^20' |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)