哪款賽車最佳?
Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description
四名專家對四款賽車進行評論。
專家A說:a號賽車是最好的。
專家B說:b號賽車是最好的。
專家C說:c號不是最佳賽車。
專家D說:專家B說錯了。
事實上只有一款賽車最佳,且只有一名專家說對了,其他三人都說錯了。請編程輸出最佳車的編號,以及哪位專家所對了。
Input
多組測試數據,對於每組測試數據,第 1 行輸入3個正整數,表示a、b 、c的編號,編號x範圍(1 <= x <= 4),且編號互不相同。
Output
對於每組測試數據,輸出正整數x和字符ch,表示最佳車的編號以及說對的專家的編號,詳細格式請參考樣例。
Sample Input
2 4 3
Sample Output
3 D
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
int main()
{
int a, b, c;
while(cin >> a >> b >> c)
{
cout << c << " D" << endl;
}
return 0;
}