样例过,全错
查看原帖
样例过,全错
1176477
x12345678901楼主2024/9/14 12:57
#include<cstdio>
#include<cmath>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cstring>
#define cfor(i,a,b) for(int i=(a);i<(b);i++)
using namespace std;

bool isprime(int n){
	for(int i=2;i*i<=n;i++){
		if(n%i==0){
			return 0;
		}
	}
	return 1;
}
struct stu{
	string name;
	int age=0;
	int sc=0;
	void px(){
		age++;
		sc/=5;
		sc*=6;
		if(sc>600){
			sc=600;
		}
	}
}; 
int main(){
	int n;
	cin>>n;
	cfor(i,0,n){
		stu t;
		cin>>t.name>>t.age>>t.sc;
		t.px();
		cout<<t.name<<' '<<t.age<<' '<<t.sc;
	}
	return 0;
} 

2024/9/14 12:57
加载中...