답안 #12143

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
12143 2014-12-21T09:12:26 Z kipa00 평균 (COCI14_prosjek) C++
50 / 50
0 ms 1088 KB
#include <cstdio>

int main() {
  long long int arr[101];
  int i, n;
  scanf("%d", &n);
  for (i=1; i<=n; ++i) {
    scanf("%lld", &arr[i]);
  }
  arr[0] = 0;
  for (i=0; i<=n; ++i) {
    arr[i] *= i;
  }
  for (i=1; i<=n; ++i) {
    printf("%lld ", arr[i] - arr[i - 1]);
  }
  printf("\n");
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Correct 0 ms 1088 KB Output is correct
8 Correct 0 ms 1088 KB Output is correct
9 Correct 0 ms 1088 KB Output is correct
10 Correct 0 ms 1088 KB Output is correct