| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138347 | ggh | 08比较三个数大小II | C++ | Compile Error | 0 MS | 0 KB | 625 | 2025-11-24 16:53:54 |
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; // 方法2.1:嵌套 if-else 比较 int min_val; if (a < b) { if (a < c) { min_val = a; } else { min_val = c; } } else { if (b < c) { min_val = b; } else { min_val = c; } } // 方法2.2:一行逻辑表达式(更简洁,等价于上面的嵌套) // int min_val = (a < b) ? ((a < c) ? a : c) : ((b < c) ? b : c); cout << min_val << endl; return 0;
Main.cc: In function 'int main()':
Main.cc:29:13: error: expected '}' at end of input
return 0;
^