# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
528239 | rainboy | Autići (COCI22_autici) | C11 | 14 ms | 1148 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define INF 0x3f3f3f3f
int min(int a, int b) { return a < b ? a : b; }
int main() {
int n, mn, i;
long long sum;
scanf("%d", &n);
sum = 0, mn = INF;
for (i = 0; i < n; i++) {
int a;
scanf("%d", &a);
sum += a;
mn = min(mn, a);
}
printf("%lld\n", sum + (long long) mn * (n - 2));
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |