Start: Jul, 03, 2019 08:38:00
2019年度暑期短学期第七天 助教场
End: Jul, 04, 2019 23:00:00
Time elapsed:
Time remaining:

Problem_ID: D
Result: Accepted
Time: 4ms
Memory: 1756kB
Author: 2018212212175
In contest: 1292

#include<iostream>
#include<string>
using namespace std;
int main() {
	int t;
	string a;
	cin >> t;
	cin.ignore();
	while (t--) {
		getline(cin, a);
		int l = a.find("print ",0);
		if (l!=-1) {
			a.replace(l, 6, "print(");
			cout << a << ")\n";
		}
		else {
			cout << a << "\n";
		}
	}
}