day 2,

Implementing a naive algorithm was fine, albeit a little slow on the Pi. Retro platforms will struggle with this one unless I come up with a better solution using numerical methods. Maybe I'll have something for the TI-92+ tomorrow. I'm sure it could handle the example input in Lua, but I want to do better than that.

The Raspberry Pi 2B uses a quad-core Cortex-A7 at 900 MHz. In 2016 this was my all-purpose "desktop" machine used for all tasks. The same Pi is still in service as my web server hosting my website and music. edlinfan.duckdns.org/music.html

[~] time ./02
Part A, B = 19219508902, 27180728081

real 0m2.188s
user 0m2.180s
sys 0m0.000s

[~] cat /sys/firmware/devicetree/base/model
Raspberry Pi 2 Model B Rev 1.2

[~] head -n 4 /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 57.60
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32

0

If you have a fediverse account, you can quote this note from your own instance. Search https://oldbytes.space/users/psf/statuses/115649813481267137 on your instance and quote it. (Note that quoting is not supported in Mastodon.)