Prime Checker

  • + 0 comments

    because sqrt(n) * sqrt(n) = n.

    For example, if you want the factors of 100.

    1 * 100
    2 * 50
    4 * 25
    5 * 20
    10 * 10 <--- after this point the numbers (a,b) switch to become (b,a)
    20 * 5
    25 * 4
    50 * 2
    100 * 1
    

    HackerRank solutions.