Smart Number 2

Sort by

recency

|

37 Discussions

|

  • + 0 comments

    I have been stuck in this question for almost 2-3 hours then i realized that i should change the lanuage (c++) to another language then i tried (java7) and i succed.. You dont have to change more then 1 line..

  • + 0 comments

    Doesn't work in ruby, no initial solution.

  • + 0 comments

    def is_smart_number(num):

    val = int(math.sqrt(num))
    if **num == int(math.pow(val , 2))**:
        return True
    return False
    
  • + 0 comments

    Only square numbers have odd factors.

  • + 0 comments

    Java 7

            if (num == val * val)