BrightOS

lmao

Jun 18th, 2021
945
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import kotlin.math.round
  2.  
  3. fun main() {
  4.     var a: Double
  5.     var k: Int
  6.     for (i in 500000..1000000) {
  7.         a = Math.sqrt(i.toDouble())
  8.         k = 0
  9.         for (j in 1..round(a).toInt()) {
  10.             if (i % j == 0 && i / j - j <= 90)
  11.                 k++
  12.            
  13.             if (k == 3) {
  14.                 println(i)
  15.                 break
  16.             }
  17.         }
  18.     }
  19. }
RAW Paste Data