Wrong Answer
Code
#include<stdio.h>
int main()
{
int N;
scanf("%d",&N);
int A[N];
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,k=0,l=0;
for (int i=0; i<N; i++)
{
scanf("%d",&A[i]);
}
for (int j=0; j<N; j++)
{
if (A[j]==0)
{
a++;
}
else if (A[j]==1)
{
b++;
}
else if (A[j]==2)
{
c++;
}
else if (A[j]==3)
{
d++;
}
else if (A[j]==4)
{
e++;
}
else if (A[j]==5)
{
f++;
}
else if (A[j]==6)
{
g++;
}
else if (A[j]==7)
{
h++;
}
else if (A[j]==8)
{
k++;
}
else if (A[j]==9)
{
l++;
}
}
if (a==1)
{
printf("0");
}
else if (b==1)
{
printf("1");
}
else if (c==1)
{
printf("2");
}
else if (d==1)
{
printf("3");
}
else if (e==1)
{
printf("4");
}
else if (f==1)
{
printf("5");
}
else if (b==1)
{
printf("1");
}
else if (g==1)
{
printf("6");
}
else if (h==1)
{
printf("7");
}
else if (k==1)
{
printf("8");
}
else if (l==1)
{
printf("9");
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1095 Uncovering the Lone Heart
- Contest
- Brain Booster #6
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-10-03 16:15:17
- Judged At
- 2024-11-11 02:48:56
- Judged By
- Score
- 10
- Total Time
- 11ms
- Peak Memory
- 580.0 KiB