代码
#include <iostream>
#include <string>
using namespace std;
int main(){
string user_input;
int t,n;
cin >> t;
while(t--){
cin >> user_input >> n;
if(user_input == "x-y"||user_input == "x-z"){
cout << n*3 << ' ' << n*2 << ' ' << n << endl;
}else if(user_input == "y-z"){
cout << n*3/2 << ' ' << n << ' ' << n/2 << endl;
}
}
return 0;
}
我找错误找了半个小时,真的服了......