A. Fence Codeforces Round #675 (Div. 2)

在这里插入图片描述
题意:就是给你三个边的大小,要你输出第四条边的大小,使得四条边可以组成四边形。
那就直接输出最大的一条边就行了。

#include<bits/stdc++.h>
using namespace std;

int main(){
    
    
	ios::sync_with_stdio(false);
	int t; cin>>t;
	while(t--){
    
    
		int a,b,c; cin>>a>>b>>c;
		int ans = max(max(a,b),c);
		cout<<ans<<endl;
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_43811879/article/details/109058464