301217: CF228A. Is your horseshoe on the other hoof?

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Is your horseshoe on the other hoof?

题意翻译

# 题目描述 有匹叫Valera的马要和朋友一起去参加聚会。 他一直关注时尚,知道穿不同颜色的马蹄铁非常流行。 去年Valera有四个马蹄铁留下来了,但也许有些颜色相同。在这种情况下,他需要去商店买更多的马蹄铁,让他不在他时髦的同志面前丢脸。 幸运的是,有家商店出售各种颜色的马蹄铁,且Valera有足够的钱购买四种。然而,为了省钱,他想花尽可能少的钱,所以你需要帮助Valera,并确定他至少需要买多少马蹄铁来保证他有四种不同颜色的马蹄铁去参加派对。 # 输入输出格式 ## 输入格式 一行,四个数,即四个马蹄铁的颜色 ## 输出格式 一行,表示他最少要花多少钱 感谢@引领天下 提供的翻译

题目描述

Valera the Horse is going to the party with friends. He has been following the fashion trends for a while, and he knows that it is very popular to wear all horseshoes of different color. Valera has got four horseshoes left from the last year, but maybe some of them have the same color. In this case he needs to go to the store and buy some few more horseshoes, not to lose face in front of his stylish comrades. Fortunately, the store sells horseshoes of all colors under the sun and Valera has enough money to buy any four of them. However, in order to save the money, he would like to spend as little money as possible, so you need to help Valera and determine what is the minimum number of horseshoes he needs to buy to wear four horseshoes of different colors to a party.

输入输出格式

输入格式


The first line contains four space-separated integers $ s_{1},s_{2},s_{3},s_{4} $ $ (1<=s_{1},s_{2},s_{3},s_{4}<=10^{9}) $ — the colors of horseshoes Valera has. Consider all possible colors indexed with integers.

输出格式


Print a single integer — the minimum number of horseshoes Valera needs to buy.

输入输出样例

输入样例 #1

1 7 3 3

输出样例 #1

1

输入样例 #2

7 7 7 7

输出样例 #2

3

Input

题意翻译

# 题目描述 有匹叫Valera的马要和朋友一起去参加聚会。 他一直关注时尚,知道穿不同颜色的马蹄铁非常流行。 去年Valera有四个马蹄铁留下来了,但也许有些颜色相同。在这种情况下,他需要去商店买更多的马蹄铁,让他不在他时髦的同志面前丢脸。 幸运的是,有家商店出售各种颜色的马蹄铁,且Valera有足够的钱购买四种。然而,为了省钱,他想花尽可能少的钱,所以你需要帮助Valera,并确定他至少需要买多少马蹄铁来保证他有四种不同颜色的马蹄铁去参加派对。 # 输入输出格式 ## 输入格式 一行,四个数,即四个马蹄铁的颜色 ## 输出格式 一行,表示他最少要花多少钱 感谢@引领天下 提供的翻译

加入题单

上一题 下一题 算法标签: