Tuesday, February 16, 2016

UVA 12646 - Zero or One

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int a , b , c;
   while(cin>>a>>b>>c){
    if(a==b && b==c)
        cout<<"*\n";
    else if(a==b && b!=c)
        cout<<"C\n";
    else if(a==c && c!=b)
        cout<<"B\n";
    else if(b==c && a!=b)
        cout<<"A\n";
   }
    return 0;
}

No comments:

Post a Comment