热门
7-9 用天平找小球 (10 分)
三个球A、B、C,大小形状相同且其中有一个球与其他球重量不同。要求找出这个不一样的球。
输入在一行中给出3个正整数,顺序对应球A、B、C的重量。
在一行中输出唯一的那个不一样的球。
1 1 2
C
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b)cout<<'C'; else if(a==c)cout<<'B'; else cout<<'A'; return 0; }