답안 #285112

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
285112 2020-08-28T10:23:26 Z 3zp Discharging (NOI20_discharging) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#define ll long long
using namespace std;
main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    for(int i = 1;i <= n;i++){
        cin >> t[i];
    }
    cout<<t[1]*n<<endl;
}

Compilation message

Discharging.cpp:4:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      |      ^
Discharging.cpp: In function 'int main()':
Discharging.cpp:10:16: error: 't' was not declared in this scope
   10 |         cin >> t[i];
      |                ^
Discharging.cpp:12:11: error: 't' was not declared in this scope
   12 |     cout<<t[1]*n<<endl;
      |           ^