Recent Posts
Notice
No Rules Rules
숫자의 개수 (feat. 백준, 25629번) 본문
728x90
반응형
숫자의 개수
https://www.acmicpc.net/problem/2577
반응형
// woohyeon.kim
// kim519620.tistory.com
#include <iostream>
using namespace std;
int main(){
ios::sync_with_stdio(false), cin.tie(NULL);
register int A, B, C, arr[10]{0};
register long long S;
cin >> A >> B >> C;
S = A * B * C;
while(S){
++arr[S % 10];
S /= 10;
}
for(auto& ans : arr)
cout << ans << "\n";
return 0;
}
// *&)*@*
10으로 나눈 나머지의 값을 카운팅해주는 산술 문제입니다.
728x90
반응형
'생활 > 코테' 카테고리의 다른 글
오늘 날짜 (feat. 백준, 10699번) (0) | 2022.09.26 |
---|---|
마트료시카 합치기 (feat. 백준, 25631번) (0) | 2022.09.26 |
홀짝 수열 (feat. 백준, 25629번) (0) | 2022.09.26 |
팰린드롬수 (feat. 백준, 1259번) (0) | 2022.09.26 |
MBTI (feat. 백준, 25640번) (0) | 2022.09.26 |
Comments