# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
20229 | 2016-05-02T04:45:17 Z | leporem91 | 평균 (COCI14_prosjek) | C++ | 2 ms | 0 KB |
#include <stdio.h> #include <algorithm> using namespace std; #define MAXN 105 int N; int main(void) { scanf("%d", &N); long long sum = 0; for (long long i = 1; i <= N; i++) { long long n; scanf("%lld", &n); long long v = n*i-sum; printf("%lld ", v); sum += v; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 0 KB | Output is correct |
2 | Correct | 2 ms | 0 KB | Output is correct |
3 | Correct | 1 ms | 0 KB | Output is correct |
4 | Correct | 1 ms | 0 KB | Output is correct |
5 | Correct | 1 ms | 0 KB | Output is correct |
6 | Correct | 1 ms | 0 KB | Output is correct |
7 | Correct | 1 ms | 0 KB | Output is correct |
8 | Correct | 1 ms | 0 KB | Output is correct |
9 | Correct | 1 ms | 0 KB | Output is correct |
10 | Correct | 1 ms | 0 KB | Output is correct |