DEV Community

loading...

Discussion on: Project Euler #5 - Finding the Smallest Multiple

Collapse
vitalipom profile image
Vitali Pomanitski • Edited
set min eval(3 * 5 * 7 * 11 * 13 * 17 * 19)
For min + 1 until infinity:
    If $_ % 20 == 0
      If $_ % 18 == 0
        If $_ % 16 == 0
          If $_ % 15 == 0
            If $_ % 14 == 0
              If $_ % 12 == 0
                echo $_
ROF 
"CONS: Testing - there's a testing variant inside the question.(And additional code aka cases of IF with modification required to test)
"PROS: Goddamn It's RIGHT!!!!