답안 #1018672

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1018672 2024-07-10T08:14:20 Z vjudge1 Autići (COCI22_autici) C++17
0 / 50
24 ms 1832 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;
    }
    for(int i = 0;i < n-1;i++) {
        ans += d[i]+d[i+1];
    }
    cout << ans;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 8 ms 996 KB Output is correct
3 Incorrect 24 ms 1832 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Incorrect 1 ms 604 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 8 ms 996 KB Output is correct
3 Incorrect 24 ms 1832 KB Output isn't correct
4 Halted 0 ms 0 KB -