概述
6471: AtCoDeer and Paint Cans
时间限制: 1 Sec 内存限制: 128 MB
提交: 224 解决: 167
[提交] [状态] [讨论版] [命题人:admin]
题目描述
AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.
Since he is forgetful, he might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.
Constraints
1≤a,b,c≤100
输入
The input is given from Standard Input in the following format:
a b c
输出
Print the number of different kinds of colors of the paint cans.
样例输入
3 1 4
样例输出
3
提示
Three different colors: 1, 3, and 4.
对没错,就是一道这样水的题但是我交了五次。
确实我很水,但是我只想说1 1 1 这三个按正常道理来说都是相同的,所以不同的颜色应该是0
但是,题目的要求就是如果它们都相同的话,那算一种不同的颜色
转载于:https://my.oschina.net/u/3900854/blog/1844669
最后
以上就是典雅宝贝为你收集整理的AtCoDeer and Paint Cans的全部内容,希望文章能够帮你解决AtCoDeer and Paint Cans所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复