All checks were successful
build-dsl-smoke / Discover matrix (push) Successful in 8s
build-dsl-smoke / Build judge (push) Successful in 11s
build-dsl-smoke / ${{ matrix.cell.build }} / ${{ matrix.cell.toolchain }} / ${{ matrix.cell.platform }} (push) Successful in 5s
memory-limit / Build judge (pull_request) Successful in 10s
build-dsl-smoke / SUMMARY (push) Successful in 3s
memory-limit / Linux / gcc (pull_request) Successful in 9s
memory-limit / Linux / clang (pull_request) Successful in 13s
memory-limit / Windows / clang (pull_request) Successful in 16s
memory-limit / Windows / msvc (pull_request) Successful in 17s
20 lines
342 B
C
20 lines
342 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void) {
|
|
long n;
|
|
if (scanf("%ld", &n) != 1) {
|
|
return 1;
|
|
}
|
|
long long sum = 0;
|
|
for (long i = 0; i < n; i++) {
|
|
long long x;
|
|
if (scanf("%lld", &x) != 1) {
|
|
return 1;
|
|
}
|
|
sum += x;
|
|
}
|
|
printf("%lld\n", sum);
|
|
return 0;
|
|
}
|