三角形 pop_l · 2024-11-25 12:33:45 · 题解 “两边之和大于第三边”是三角形的一个基本性质,有了这个,我们就可以作出这道题。 #include <bits/stdc++.h> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<y-x+1<<" ";//y为长边 cout<<x+y-1;//x,y均为短边 return 0; }