python count내장함수를 이용하면 해당 문자의 개수를 구할 수 있다.
import sys
input = sys.stdin.readline
A = int(input())
B = int(input())
C = int(input())
result = A * B * C
result = list(str(result))
for i in range(10):
print(result.count(str(i)))
2577번: 숫자의 개수
첫째 줄에 A, 둘째 줄에 B, 셋째 줄에 C가 주어진다. A, B, C는 모두 100보다 같거나 크고, 1,000보다 작은 자연수이다.
www.acmicpc.net
728x90
반응형
'Algorithm > 백준' 카테고리의 다른 글
백준 10828 - 스택 python (0) | 2021.03.26 |
---|---|
백준 4344 - 평균은 넘겠지 파이썬 (0) | 2021.03.23 |
백준 10817- 세 수 (0) | 2021.03.22 |
백준 10818 - 최소, 최대 python (구현) (0) | 2021.03.19 |
백준 10699 - 파이썬 (0) | 2021.03.18 |