YTU 2904: B--Faultfinding

网友投稿 273 2022-08-30

YTU 2904: B--Faultfinding

2904: B--Faultfinding

时间限制: 1 Sec   内存限制: 128 MB

提交: 64

解决: 33

题目描述

Do you remember the game in which we find difference among several similar pictures? Now we change it into digital version. There are N digits, same or different. Please find how many different digits there are among them and output the number.

输入

Each group of the first line is N (1<=N<=10000). The second line consists N integers.

输出

The number of different digits.

样例输入

21 13 1 2 3

样例输出

13

im0qianqian_站在回忆的河边看着摇晃的渡船终年无声地摆渡,它们就这样安静地画下黄昏画下清晨......

#include int main(){ int s,a[10000],n=1,i,j; while (~scanf("%d",&s)&&s) { for (i=0; i=0; j--) { if (a[j]==a[i])break; if (j==0)n++; } printf("%d\n",n); } return 0;}

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:YTU 1020: I think it
下一篇:特步双11金曲营销声入人心,解密背后的变革与超越!(特步营销分析)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~