Short Cake
8PM - Animal Crossing Wild World

사생활 보호 설정

https://gamjia.tistory.com

Mini Rooms

  • 내 미니룸
  • 미니미설정
  • 미니룸설정
  • 답글수 [0]

What Friends Say

한마디로 표현해봐~

1촌평 관리

2577번 숫자의 개수

GamJia 2023. 3. 24. 09:06

단계별로 풀어보기 - 1차원 배열 - 3단계

https://www.acmicpc.net/problem/2577

#include <iostream>
using namespace std;
int main()
{
    int A,B,C;
    int arr[10]={0,};
    cin>>A>>B>>C;
    
    int result=A*B*C;    
    
    while(result!=0)
    {
        arr[result%10]++;
        result/=10;
    }
    
    for(int i=0;i<10;i++)
    {
        cout<<arr[i]<<endl;
    }
    
    return 0;
}

'BaekJoon' 카테고리의 다른 글

8958번 OX퀴즈  (0) 2023.03.24
3052번 나머지  (0) 2023.03.24
2562번 최댓값  (0) 2023.03.24
10951번 A+B -4  (0) 2023.03.22
10952번 A+B -5  (0) 2023.03.22