João João

시간 제한0.5초메모리 제한2048 MB

요약
난이도 1부터 4까지로 분류된 10개의 문제가 주어질 때, 네 난이도가 모두 있도록 만들기 위해 더 만들어야 하는 문제 수를 구한다.
난이도

쉬움10점 중 1점

유형
구현, 배열
정답자
아직 제출이 없습니다

문제

In 2025, the person responsible for coordinating the team that creates the OBI – Online Battle of Influencers – exam is Professor João João, who, in addition to being a professor, is a famous and influential influencer.

So far, the team has created 1010 tasks, and each task has been categorized into one of four difficulty levels: 11, 22, 33, and 44.

Professor João João wants to know how many more tasks need to be created so that it is possible to assemble an exam with exactly four tasks, each at a different difficulty level.

Given the list of difficulty levels of the tasks already created, can you help Professor João João determine how many tasks still need to be created?

입력

The input consists of a single line containing 1010 integers D_1,…,D_10D\_1, \dots , D\_{10}, where D_iD\_i denotes the difficulty level of task ii (1≤D_i≤41 ≤ D\_i ≤ 4, for 1≤i≤101 ≤ i ≤ 10).

출력

Your program should print a single line to the output, containing a single integer: the minimum number of tasks that need to be created so that it is possible to assemble an exam with four tasks, each at a different difficulty level.

예제2

  1. 예제 1

    입력
    1 3 4 1 3 4 1 3 4 1
    
    예상 출력
    1
    
  2. 예제 2

    입력
    4 1 1 4 3 1 2 1 2 2
    
    예상 출력
    0