P5744 【深基7.习9】培训

题目传送门

#include <bits/stdc++.h>

using namespace std;
const int N = 1e6;

struct Student {
    string name;
    int age, score;
} a[N];

int main() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> a[i].name >> a[i].age >> a[i].score;
        a[i].age++, a[i].score = a[i].score / 5 * 6;
        if (a[i].score > 600) a[i].score = 600;
        cout << a[i].name << " " << a[i].age << " " << a[i].score << endl;
    }
    return 0;
}
posted @ 2021-11-19 09:47  糖豆爸爸  阅读(132)  评论(0编辑  收藏  举报
Live2D