#UVa:12646-Zero or One

灆洢 2020-04-27 02:01:43

根據題目規則去比較得到結果即可。

C++(0.000)

/*******************************************************/
/* UVa 12646 Zero or One                               */
/* Author: Maplewing [at] knightzone.studio            */
/* Version: 2020/04/27                                 */
/*******************************************************/
#include <iostream>
#include <cstdio>
using namespace std;

int main() {
  int aChoose, bChoose, cChoose;
  while (scanf("%d%d%d", &aChoose, &bChoose, &cChoose) != EOF) {
    if (aChoose != bChoose && aChoose != cChoose) printf("A\n");
    else if (bChoose != aChoose && bChoose != cChoose) printf("B\n");
    else if (cChoose != aChoose && cChoose != bChoose) printf("C\n");
    else printf("*\n");
  }
  return 0;
}

發表迴響

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料