Jump to content
Main menu
Main menu
move to sidebar
hide
Social
Discord
Facebook
Twitter
Explore
Languages
Tasks
Random page
Rosetta Code
Search
Search
Create account
Log in
Personal tools
Dark mode
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Steady squares: Difference between revisions
Page
Discussion
English
Read
View source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
View source
View history
Refresh
General
Special pages
Printable version
Get shortened URL
← Older edit
Newer edit →
Steady squares
(view source)
Revision as of 16:32, 4 February 2023
413 bytes removed
,
1 year ago
→{{header|RPL}}
Revision as of 16:24, 4 February 2023
(
view source
)
Aerobar
(
talk
|
contribs
)
(
→{{header|RPL}}
)
← Older edit
Revision as of 16:32, 4 February 2023
(
view source
)
Aerobar
(
talk
|
contribs
)
(
→{{header|RPL}}
)
Newer edit →
Line 1,990:
<pre>
1: { 5 6 25 76 376 625 9376 }
</pre>
===Slight optimization====
Taking into account that steady squares can only end up with 5 or 6
≪ { } 0 ROT '''FOR''' n
5 6 '''FOR''' j
n j + →STR LAST SQ →STR
DUP SIZE 3 PICK SIZE - 1 + OVER SIZE SUB
'''IF''' == '''THEN''' n j + + '''END'''
'''NEXT'''
10 '''STEP'''
≫ ‘STEDY’ STO
100000 STEDY
{{out}}
<pre>
1: { 5 6 25 76 376 625 9376 90625 }
</pre>
Aerobar
1,150
edits
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
More information
OK
Toggle limited content width