12646 - Zero or One
Posted: Sun Sep 07, 2014 3:11 am
Use this thread to discuss this problem.
The Online Judge board
https://uva.onlinejudge.org/board/
https://uva.onlinejudge.org/board/viewtopic.php?f=67&t=207978
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;
}