P7578 1分求助
  • 板块灌水区
  • 楼主Cokewithice
  • 当前回复1
  • 已保存回复1
  • 发布时间2023/3/8 19:05
  • 上次更新2023/10/23 22:40:34
查看原帖
P7578 1分求助
607528
Cokewithice楼主2023/3/8 19:05
#include <bits/stdc++.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
long long x,y,z,k;
string s;
int main(int argc, char** argv) {
	cin>>k;
	while(k--)
	{
		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;
	}
	
	return 0;
}

2023/3/8 19:05
加载中...