# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
299136 | 2020-09-14T13:55:20 Z | theshadow_04 | 평균 (COCI14_prosjek) | C++14 | 1 ms | 512 KB |
// VU TRUONG AN #include <bits/stdc++.h> #define F first #define S second #define MOD 1000000007 #define pb push_back #define bit(x,p) ((x>>p) & 1) #define ll long long #define Task "Prosjek" using namespace std; const int base = 100003; const int maxn = 100005; int n; long long b[maxn]; int main(){ ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); if(fopen(Task".inp","r")){ freopen(Task".inp","r",stdin); freopen(Task".out","w",stdout); } cin >> n; for(int i = 1;i <= n;++i) cin >> b[i]; for(int i = 1;i <= n;++i){ long long a = 1ll * b[i] * i - 1ll * b[i - 1] * (i - 1); cout << a << " "; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 384 KB | Output is correct |
2 | Correct | 1 ms | 384 KB | Output is correct |
3 | Correct | 1 ms | 512 KB | Output is correct |
4 | Correct | 1 ms | 384 KB | Output is correct |
5 | Correct | 1 ms | 384 KB | Output is correct |
6 | Correct | 1 ms | 384 KB | Output is correct |
7 | Correct | 1 ms | 384 KB | Output is correct |
8 | Correct | 1 ms | 384 KB | Output is correct |
9 | Correct | 1 ms | 384 KB | Output is correct |
10 | Correct | 1 ms | 384 KB | Output is correct |