三个球A、B、C,大小形状相同且其中有一个球与其他球重量不同。要求找出这个不一样的球。

输入格式:

输入在一行中给出3个正整数,顺序对应球A、B、C的重量。

输出格式:

在一行中输出唯一的那个不一样的球。

输入样例:

1 1 2

输出样例:

C

 

 

 1 #include <stdio.h>
 2 
 3 main()
 4 {
 5     int a, b, c;
 6     scanf("%d %d %d", &a, &b, &c);
 7     
 8     if(a == b) {
 9         printf("C");
10     }
11     else if (a == c) {
12         printf("B");
13     }
14     else if (b == c) {
15         printf("A");
16     }
17      
18     return 0; 
19 } 

 

相关文章:

  • 2022-02-19
  • 2021-06-25
  • 2022-12-23
  • 2021-09-12
猜你喜欢
  • 2022-02-09
  • 2022-02-26
  • 2021-07-15
  • 2022-12-23
  • 2021-08-29
  • 2021-06-08
相关资源
相似解决方案