백준 2577번 [파이썬 알고리즘] : 숫자의 개수 _ count함수 활용
[Python] 백준 알고리즘 온라인 저지 2577번 : 숫자의 개수 Python3 코드 1) for문으로 숫자를 입력받는 코드 total = 1 for _ in range(3): i = int(input()) total *= i # 3개의 정수를 곱함 total_str = str(total) # 숫자를 str타입으로 변환 for num in range(10): # 0부터 9까지 num_count = total_str.count(str(num)) print(num_count) 2) 입력받는 세 수를 각각 변수에 지정하는 코드 a = int(input()) b = int(input()) c = int(input()) total_str = str(a*b*c) # 숫자를 곱해서 str타입으로 변환 for nu..
파이썬 스킬업/백준 알고리즘 연습
2020. 7. 5. 21:37
반응형