谁帮我看下,把快读改成cin就没事
查看原帖
谁帮我看下,把快读改成cin就没事
1059049
Bramble_Marshall楼主2023/11/9 22:12
#include <bits/stdc++.h>

using namespace std;

string input() {
	string ans = "";
	char s;
	s = getchar();
	while (s != EOF && s != ' ')
		s = getchar(),
		ans = ans + s;
	return ans;
}

int main() {
	string name = "";
	int n, y = 0;
	int t = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		name = input();
		scanf("%d %d", &y, &t);
		y++;
		t *= 1.2;
		t = t > 600 ? 600 : t;
		cout << name;
		printf("%d %d\n", y, t);
    }
    return 0;
}
2023/11/9 22:12
加载中...