Sort by

recency

|

129 Discussions

|

  • + 0 comments

    Short lines at John Wayne Airport really make travel less stressful — nothing beats getting through check-in fast and starting the trip relaxed. After that smooth airport experience, heading to Carnelian Bay Vacation Rentals feels like the perfect way to keep the calm going. Find More peaceful stays where the lake breeze and cozy comfort make every moment worth it. It’s the kind of place where you actually feel like you’re on vacation, not just visiting.

  • + 0 comments
    bool is_smart_number(int num) {
        int val = (int) sqrt(num);
        if(num == val * val)
            return true;
        return false;
    }
    
  • + 0 comments

    This is the finished Python code. You should change "if num / val == 1:" to "if num / val == val".

    import math
    
    def is_smart_number(num):
        val = int(math.sqrt(num))
        if num / val == val:
            return True
        return False
    
    for _ in range(int(input())):
        num = int(input())
        ans = is_smart_number(num)
        if ans:
            print("YES")
        else:
            print("NO")
    
  • + 0 comments

    Here is my c++ solution, you can watch video explanation here : https://youtu.be/Qs9rxqfzTs8

    bool is_smart_number(int num) {
        int val = (int) sqrt(num);
        if(val * val == num)
            return true;
        return false;
    }
    
  • + 0 comments

    For Java coders: change line 10 to:

            if(val * val == num)
    

    A smart number is only smart if its a perfect square.