-
2577_Python // 숫자의 개수IT_Baekjoon 단계별로 풀어보기/1차원 배열 2020. 1. 8. 02:24
Python
import sys a = int(sys.stdin.readline()) b = int(sys.stdin.readline()) c = int(sys.stdin.readline()) A = str(a*b*c) for i in range(0,10) : print(A.count(str(i)))
===
문자열 인덱싱을 이용해 숫자가 뭔지를 알고 하나하나 셀려고 했는데 문자열에 count라는 편한 함수가 있었네요;;
'IT_Baekjoon 단계별로 풀어보기 > 1차원 배열' 카테고리의 다른 글
1546_Python // 평균 (0) 2020.01.08 3052_Python // 나머지 (0) 2020.01.08 2920_Python // 음계 (0) 2020.01.08 2562_Python // 최댓값 (0) 2020.01.08 10818_Python // 최소,최대 (0) 2020.01.08