# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
937536 | 2024-03-04T08:06:26 Z | sleepntsheep | 평균 (COCI14_prosjek) | C | 1 ms | 360 KB |
#include<stdio.h> int n;long long a[101],b[101],sa; int main(){ scanf("%d",&n); for(int i=1;i<=n;++i)scanf("%lld",b+i); sa=a[1]=b[1];printf("%lld ",a[1]); for(int i=2;i<=n;++i){ a[i]=b[i]*1ll*i-sa; sa+=a[i]; printf("%lld ",a[i]); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 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 | 360 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 |