感觉没错的代码全WA了
  • 板块P7106 双生独白
  • 楼主Pawnn
  • 当前回复3
  • 已保存回复3
  • 发布时间2020/12/13 23:40
  • 上次更新2023/11/5 06:08:52
查看原帖
感觉没错的代码全WA了
446559
Pawnn楼主2020/12/13 23:40
#include<iostream>
using namespace std;
int main()
{
	char a[6];
	cout << "#";
	for (int i = 0; i < 6; i++)
	{
		cin >>a[i];
	}
	cout << endl << "#";
	for (int i = 0; i < 6; i++)
	{
		if (a[i] == '0')cout << 'F';
		if (a[i] == '1')cout << 'E';
		if (a[i] == '2')cout << 'D';
		if (a[i] =='3')cout << 'C';
		if (a[i] == '4')cout << 'B';
		if (a[i] == '5')cout << 'A';
		if (a[i] == '6')cout << '9';
		if (a[i] == '7')cout << '8';
		if (a[i] == '8')cout << '7';
		if (a[i] == '9')cout << '6';
		if (a[i] == 'A')cout << '5';
		if (a[i] == 'B')cout << '4';
		if (a[i] == 'C')cout << '3';
		if (a[i] == 'D')cout << '2';
		if (a[i] == 'E')cout << '1';
		if (a[i] == 'F')cout << '0';
	}
	return 0;
}
2020/12/13 23:40
加载中...