12646 - Zero or One
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
12646 - Zero or One
Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 2
- Joined: Sun Oct 16, 2016 4:26 pm
Re: 12646 - Zero or One
why i got WA ?
Code: Select all
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d", &a,&b,&c); getchar();
if((a==0 && b==0 && c==0)||(a==1 && b==1 && c==1)){
printf("*\n");
}
else if((a==1 && b==0 && c==0)||(a==0 && b==1 && c==1)){
printf("A\n");
}
else if((a==0 && b==1 && c==0)||(a==1 && b==0 && c==1)){
printf("B\n");
}
else{
printf("C\n");
}
getchar();
return 0;
}