Page 1 of 1

12646 - Zero or One

Posted: Sun Sep 07, 2014 3:11 am
by brianfry713
Use this thread to discuss this problem.

Re: 12646 - Zero or One

Posted: Sun Oct 16, 2016 4:33 pm
by mirukukafe
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;
}