题解 | 三角形的边
三角形的边
https://www.nowcoder.com/practice/05dbd1cd43b24dbbae567b3e816d4e97?tpId=40&tags=&title=&difficulty=2&judgeStatus=0&rp=1&sourceUrl=
// 一行代码实现 #include <iostream> using namespace std; int min_add_mid_sub_max(int a, int b, int c) { return a > b ? (a > c ? (b + c) - a : (a + b) - c) : (b > c ? (a + c) - b :(a + b) - c); } int main() { int a, b, c; while (cin >> a >> b >> c) { cout << min_add_mid_sub_max(a, b, c) << endl; } }