60分,第一个测试点打出来输入输出结果,不觉得有错
查看原帖
60分,第一个测试点打出来输入输出结果,不觉得有错
1166079
thliup楼主2023/12/20 17:08
#include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<stdbool.h>
#include<stdio.h>
#include<cstring>
using namespace std;
struct student {
	string name;
	int age;
	int score;

}
qwe[1000];
int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> qwe[i].name >> qwe[i].age >> qwe[i].score ;
		if(qwe[i].age<100)
		   qwe[i].age++;
		qwe[i].score = qwe[i].score*6 / 5;
		if (qwe[i].score * 6 / 5 > 600)
			qwe[i].score = 600;
	}
	for (int i = 0; i < n; i++) {
		cout << qwe[i].name << " " << qwe[i].age << " " << qwe[i].score << endl;
	}
	return 0;

}
2023/12/20 17:08
加载中...