# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
470556 | 2021-09-04T09:08:05 Z | Karabasan | Prosjek (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]; pre[i]+=cevap; printf("%d ",cevap); } return 0; } /* ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀ ⠀⠀⠀⣴⠿⠏⠀⠀⠀⠀ ⠀⠀⢳⡀ ⡏⠀⠀⠀⠀⠀⢷ ⠀⠀⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀⣧⠀⢸⠀⠀⠀⠀⠀ ⡇ ⠀⠀⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲⣿⠀⣸⠀⠀Ez⠀ ⡇ ⠀⠀⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀ ⠀⣿⠀⢹⠀⠀⠀⠀⠀ ⡇ ⠀⠀⠙⢿⣯⠄⠀⠀⠀⢀⡀⠀⠀⡿⠀⠀⡇⠀⠀⠀⠀⡼ ⠀⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀⠀⠘⠤⣄⣠⠞⠀ ⠀⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀ ⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀ ⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀⠀⣄⢸⠀⠀⠀⠀⠀⠀ ⣿⣿⣧⣀⣿.........⣀⣰⣏⣘⣆⣀⠀⠀ ░██████╗░█████╗░██╗████████╗░█████╗░███╗░░░███╗░█████╗░ ██╔════╝██╔══██╗██║╚══██╔══╝██╔══██╗████╗░████║██╔══██╗ ╚█████╗░███████║██║░░░██║░░░███████║██╔████╔██║███████║ ░╚═══██╗██╔══██║██║░░░██║░░░██╔══██║██║╚██╔╝██║██╔══██║ ██████╔╝██║░░██║██║░░░██║░░░██║░░██║██║░╚═╝░██║██║░░██║ ╚═════╝░╚═╝░░╚═╝╚═╝░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚═╝░░╚═╝ */
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 1 ms | 204 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |