# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
470558 | 2021-09-04T09:12:34 Z | watoKE | 평균 (COCI14_prosjek) | C++17 | 1 ms | 204 KB |
#include <bits/stdc++.h> #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define forcin for(int i=1;i<=n;i++) scanf("%d",&dizi[i]); #define forcout for(int i=0;i<n;i++) printf("%d ",dizi[i]); #define ll long long using namespace std; int n,t,cevap; int dizi[105]; int pre[105]; int main() { fast; scanf("%d",&n); forcin; for(int i=1;i<=n;i++) dizi[i]*=i; for(int i=1;i<=n;i++) { cevap=dizi[i]-pre[i-1]; pre[i]+=cevap+pre[i-1]; printf("%d ",cevap); } return 0; } /* ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀ ⠀⠀⠀⣴⠿⠏⠀⠀⠀⠀ ⠀⠀⢳⡀ ⡏⠀⠀⠀⠀⠀⢷ ⠀⠀⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀⣧⠀⢸⠀⠀⠀⠀⠀ ⡇ ⠀⠀⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲⣿⠀⣸⠀⠀Ez⠀ ⡇ ⠀⠀⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀ ⠀⣿⠀⢹⠀⠀⠀⠀⠀ ⡇ ⠀⠀⠙⢿⣯⠄⠀⠀⠀⢀⡀⠀⠀⡿⠀⠀⡇⠀⠀⠀⠀⡼ ⠀⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀⠀⠘⠤⣄⣠⠞⠀ ⠀⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀ ⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀ ⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀⠀⣄⢸⠀⠀⠀⠀⠀⠀ ⣿⣿⣧⣀⣿.........⣀⣰⣏⣘⣆⣀⠀⠀ ░██████╗░█████╗░██╗████████╗░█████╗░███╗░░░███╗░█████╗░ ██╔════╝██╔══██╗██║╚══██╔══╝██╔══██╗████╗░████║██╔══██╗ ╚█████╗░███████║██║░░░██║░░░███████║██╔████╔██║███████║ SENSEI ░╚═══██╗██╔══██║██║░░░██║░░░██╔══██║██║╚██╔╝██║██╔══██║ ██████╔╝██║░░██║██║░░░██║░░░██║░░██║██║░╚═╝░██║██║░░██║ ╚═════╝░╚═╝░░╚═╝╚═╝░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚═╝░░╚═╝ */
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 0 ms | 204 KB | Output is correct |