Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
222896 | 232214陈皓轩 | *小美的加法 | C++ | Wrong Answer | 20 | 28 MS | 276 KB | 303 | 2023-12-17 14:01:10 |
#include <iostream> #define int long long using namespace std; int n, t1, t2, sum; signed main() { cin >> n; for (int i = 1; i <= n; i++) { int t; cin >> t; if (t > t2) { t2 = t; } if (t > t1) { t2 = t1; t1 = t; } sum += t; } cout << sum - t1 - t2 + t1 * t2; }