Submission #1018675

# Submission time Handle Problem Language Result Execution time Memory
1018675 2024-07-10T08:17:59 Z vjudge1 Autići (COCI22_autici) C++17
0 / 50
11 ms 604 KB
#include <iostream>
using namespace std;

int main() {
    int n,d[100000];
    int ans = 0;
    cin >> n;
    for(int i = 0;i < n;i++) {
        cin >> d[i];
    }

    if(n==1) {
        cout << 0;
        return 0;
    }
    cout << (n+1)*d[0];
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:6:9: warning: unused variable 'ans' [-Wunused-variable]
    6 |     int ans = 0;
      |         ^~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 600 KB Output is correct
2 Incorrect 11 ms 600 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 604 KB Output is correct
2 Incorrect 0 ms 604 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 600 KB Output is correct
2 Incorrect 11 ms 600 KB Output isn't correct
3 Halted 0 ms 0 KB -