답안 #1042227

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1042227 2024-08-02T16:58:25 Z biserailieva 평균 (COCI14_prosjek) C++14
50 / 50
0 ms 604 KB
#include <iostream>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int A[n+1];
    for(int i=1;i<n+1;i++)
    {
        cin>>A[i];
    }
    int B[n];
    int zbir=0;
    for(int i=1;i<n+1;i++)
    {
        B[i]=i*A[i]-zbir;
        zbir+=B[i];
        cout<<B[i]<<' ';
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 352 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 604 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct