[프로그래머스] 하샤드 수 - Python

이지각·2023년 6월 2일
0

프로그래머스

목록 보기
2/102

문제

제한사항

입출력 예

나의 코드

def solution(x):
	answer += int(i)
for i in str(x):
	answer += int(i)
if x % answer == 0:
	return True
else:
	return False
    
profile
정보보안학과생

0개의 댓글