파이썬 #해커랭크 #디버깅 #Smart Number1 HackerRank / Smart Number / Python http://hackerrank.com/challenges/smart-number/problem?isFullScreen=true Smart Number | HackerRank Find if a number has even number of factors. www.hackerrank.com 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") 핵심은 약수가 홀수면.. 2021. 12. 26. 이전 1 다음