Numbers which are not the sum of distinct squares: Difference between revisions
Numbers which are not the sum of distinct squares (view source)
Revision as of 22:30, 23 November 2021
, 2 years ago→{{header|Raku}}: more style twiddling
Thundergnat (talk | contribs) m (→{{header|Raku}}: clarify slightly) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: more style twiddling) |
||
Line 35:
=={{header|Raku}}==
[https://tio.run/##jVA7TsMwGN5zik9qhraApS4MjVKxcgZEKwN/wJLjJH4gqip7uQSHYGXrUXqRkD@maUcyWIq/t2uy@rbryi3uXBOkJYcc6@P@C6KU9RLzw3eGCe5NoYzyBEdW9ZyqwB89SYrKYiEEa25WSF2DHcZvAobpnewWz1X5pIz0qjJsILUeTZg6dAglFzh1eVj3do/iQugOP6IniWBUE0i4yvpsVNtg4g9nRq9dcmrCqKiDe5ummxmkeYGhD49gNDkXUdJUumxUqALpBnkeQS@VxhUW/brRasmEFqQd9ddaOs@isxdW5ym8JBuwfuB0hnbIiWcdPF4t1ZjjuP@M1a/5Uc/JXPgfAUnbdb8 Try it online!]
'''Spoiler:''' ''(highlight to read)''<br>
Line 48:
if $_ == @run.tail + 1 { @run.push: $_ } else { last if @run.elems > @squares[$sq]; @run = () }
}
put grep
}</lang>
{{out}}
|