社区讨论
样例过了,提交全WA
P5744【深基7.习9】培训参与者 2已保存回复 3
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 3 条
- 当前快照
- 1 份
- 快照标识符
- @lo16l918
- 此快照首次捕获于
- 2023/10/22 16:02 2 年前
- 此快照最后确认于
- 2023/11/02 15:37 2 年前
CPP
#include <bits/stdc++.h>
using namespace std;
const int maxn=1500;
struct Student{
string name;
int old,cj;
}student[1009];
int main(){
int n;
cin >> n;
for(int i=1;i<=n;i++){
cin >> student[i].name >>student[i].old >>student[i].cj;
student[i].old++;
student[i].cj=student[i].cj+student[i].cj/5;
if(student[i].cj>600){
student[i].cj=600;
}
cout <<student[i].name << " "<<student[i].old <<" "<< student[i].cj;
}
return 0;
}
回复
共 3 条回复,欢迎继续交流。
正在加载回复...