Created
March 10, 2015 03:24
-
-
Save shohan4556/2ceb9c7bda648f883674 to your computer and use it in GitHub Desktop.
URI : 1467 -- Zero or One solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// URI : 1467 -- Zero or One | |
| /// Author : Shohanur Rahaman | |
| #include<stdio.h> | |
| int main() | |
| { | |
| int a,b,c; | |
| while(scanf("%d %d %d",&a,&b,&c)==3){ | |
| if(a==0 && b==0 && c==0) | |
| printf("*\n"); | |
| else if(a==1 && b==0 && c==0) | |
| printf("A\n"); | |
| else if(a==0 && b==1 && c==0) | |
| printf("B\n"); | |
| else if(a==0 && b==0 && c==1) | |
| printf("C\n"); | |
| else if(a==0 && b==1 && c==1) | |
| printf("A\n"); | |
| else if(a==1 && b==0 && c==1) | |
| printf("B\n"); | |
| else if(a==1 && b==1 && c==0) | |
| printf("C\n"); | |
| else | |
| printf("*\n"); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment