Files
project_euler/69/solution.uiua

14 lines
545 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# project euler 69
# euler totient function
# n ? Φ(n)
Φ ← ⁅×/×-⊸÷⊙1◴⊸°/× # from uiua discord by maweo
# find n that maximizes n÷Φ(n)
# range ? max_n÷Φ(n)
s ← ▽⊸(=⊸/↥÷)⊸≡Φ
s +1⇡1e6
# online solution
# https://uiua.org/pad?src=0_17_0-dev_2__IyBwcm9qZWN0IGV1bGVyIDY5CgojIGV1bGVyIHRvdGllbnQgZnVuY3Rpb24KIyBuID8gzqYobikKzqYg4oaQIOKBhcOXL8OXLeKKuMO34oqZMeKXtOKKuMKwL8OXICMgYnkgZGlzY29yZDptYXdlbwoKIyBzb2x1dGlvbgojIHJhbmdlID8gbWF4X27Dt86mKG4pCnMg4oaQIOKWveKKuCg94oq4L-KGpcO3KeKKuOKJoc6mCgpzICsx4oehMWU2Cg==