60,求助,玄关(提供正确思路必关)
查看原帖
60,求助,玄关(提供正确思路必关)
1390411
taoruiguo120楼主2024/10/18 15:47
#include <iostream>
using namespace std;

struct s {
	string nm;
	int b;
	int c;
} st[15];

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> st[i].nm >> st[i].b >> st[i].c;
	}
	for (int i = 0; i < n; i++) {
		cout << st[i].nm << " " << st[i].b + 1 << " ";
		if (st[i].c * 1.2 <= 600)
			cout << st[i].c * 1.2 << endl;
		else
			cout << " " << "600" << endl;
	}
	return 0;
}

玄官

2024/10/18 15:47
加载中...