3 solutions

  • 0
    @ 2023-10-21 18:38:06

    //C语言 #include <stdio.h>

    int main() { int n; scanf("%d", &n); int a = 0; int sum = 0; int b;

    while (a < n) {
    	scanf("%d", &b);
    	sum += b;
    	a++;
    }
    printf("%d", sum);
    return 0;
    

    }

    Information

    ID
    6760
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    6
    Tags
    # Submissions
    348
    Accepted
    113
    Uploaded By