签到题
感觉自己写的有点慢
只要看出来 x:y:z=3:2:1x:y:z=3:2:1x:y:z=3:2:1就完事了
AC代码
#include <iostream>
#include <string>
using namespace std;
using LL = long long;
int main()
{
LL T, x, y, z;
string s;
cin >> T;
while (T--) {
cin >> s;
if (s == "x-z") {
cin >> y;
z = y >> 1;
x = y + z;
} else {
cin >> z;
y = z + z;
x = y + z;
}
cout << x << " " << y << " " << z << endl;
}
}