2577 c++
-
2577) 숫자의 개수백준코딩일기 2020. 10. 17. 00:38
문제 ) www.acmicpc.net/problem/2577 2577번: 숫자의 개수 첫째 줄에 A, 둘째 줄에 B, 셋째 줄에 C가 주어진다. A, B, C는 모두 100보다 같거나 크고, 1,000보다 작은 자연수이다. www.acmicpc.net 풀이 ) 문제에서 "A = 150, B = 266, C = 427 이라면 A × B × C = 150 × 266 × 427 = 17037300 이 되고, 계산한 결과 17037300 에는 0이 3번, 1이 1번, 3이 2번, 7이 2번 쓰였다." 는 예제를 가지고 생각해보면 17037300 % 10 = 0 이고, 두번째 '0'을 세기 위해서 multiply = multiply / 10 을 한 값 (=1703730) 을 넣어서 다시 나머지를 구해준다. 코드 ..