#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int a[205]={0};
int ct[205]={0};
int main(){
int i=0,j=0;
int length=0;
while(scanf("%d",&a[i])==1)
{
++i;
++length;
}
int k,l;
for(k=0;k<length-1;k++)
{
//printf("innhn\n");
for(l=0;l<length-k-1;l++)
{
//printf("wwwwwwwwwwwwwwwinnhn\n");
if(a[l]>=a[l+1])
{
int temp=a[l];
a[l]=a[l+1];
a[l+1]=temp;
}
}
}
for(j=0;j<length;j++)
{
ct[a[j]]++;
}
int ll;
for(ll=a[0];ll<length+a[0];ll++)
{
if(ct[ll]==2)
{
printf("repeat=%d ",a[ll]);
ct[ll]++;
}
if(ct[ll]==0)
{
printf("absent=%d ",a[ll]-1);
}
}
return 0;
}
03-28
1521
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-06
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交