Poker Hand | 프로그래밍의 벗 PivotOJ
PivotOJ

Poker Hand

시간 제한: 2000ms메모리 제한: 512MB출처: ICPC Mid-Central Regional 2018BOJ 16408

문제

You are given a five-card hand drawn from a standard 52-card deck. The strength of your hand is the maximum value k such that there are k cards in your hand that have the same rank.

Compute the strength of your hand.

입력

The input will consist of a single line, with five two-character strings separated by spaces.

The first character in each string will be the rank of the card, and will be one of A23456789TJQK. The second character in the string will be the suit of the card, and will be one of CDHS.

You may assume all the strings are distinct.

출력

Output, on a single line, the strength of your hand.

예제

예제 1

입력
AC AD AH AS KD
출력
4

예제 2

입력
2C 4D 4H 2D 2H
출력
3

예제 3

입력
AH 2H 3H 4H 5H
출력
1
코드를 제출하려면 로그인하세요.