Advertisement
BrightOS

lmao

Jun 18th, 2021
1,389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.39 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement