| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1264830 | ngunguoi45 | 평균 (COCI14_prosjek) | C++17 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
#define add emplace_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using pll = pair<ll,ll>;
using pii = pair<int,int>;
const int maxn = 105;
int n;
ll a[maxn], b[maxn];
int main () {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n;
for (int i = 1;i <= n; i++) {
cin >> b[i];
}
for (int i = 1;i <= n; i++) {
a[i] = 1LL*b[i] * i - 1LL*b[i-1] * (i-1);
cout << a[i] << " ";
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
