제출 #791400

#제출 시각아이디문제언어결과실행 시간메모리
791400adaawfFeast (NOI19_feast)C++14
컴파일 에러
0 ms0 KiB
#include <iostream>
using namespace std;
long long int a[1000005];
int main() {
    long long int n, k;
    cin >> n >> k;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        c += a[i];
    }
    cout << c;
}

컴파일 시 표준 에러 (stderr) 메시지

feast.cpp: In function 'int main()':
feast.cpp:9:9: error: 'c' was not declared in this scope
    9 |         c += a[i];
      |         ^
feast.cpp:11:13: error: 'c' was not declared in this scope
   11 |     cout << c;
      |             ^