文章

49

粉丝

90

获赞

9

访问

26.7k

头像
C++
P1543 云南大学机试题
发布于2024年3月17日 19:22
阅读数 497

#include<iostream>
#include<string>
using namespace std;

int main()
{
	int n;
	while (cin >> n)
	{
		switch (n)
		{
		case 1:
			cout << 1 << " " << 1 << endl;
			break;
		case 2:
			cout << 1 << " " << 2 << endl;
			break;
		case 3:
			cout << 1 << " " << 3 << endl;
			break;
		case 4:
			cout << 2 << " " << 1 << endl;
			break;
		case 5:
			cout << 2 << " " << 2 << endl;
			break;
		case 6:
			cout << 2 << " " << 3 << endl;
			break;
		case 7:
			cout << 3 << " " << 1 << endl;
			break;
		case 8:
			cout << 3 << " " << 2 << endl;
			break;
		case 9:
			cout << 3 << " " << 3 << endl;
			break;
		}
	}
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发