Submission #77145

#TimeUsernameProblemLanguageResultExecution timeMemory
77145kimmyprachaProsjek (COCI14_prosjek)C++17
50 / 50
2 ms580 KiB
#include <bits/stdc++.h> using namespace std; long long A[200] , B[200]; int main(){ int n; scanf("%d",&n); for(int i = 1 ; i <= n ; ++i){ scanf("%lld",&B[i]); } long long Sum = 0; for(int i = 1 ; i<= n; ++i){ A[i] = B[i]*i - Sum; Sum = B[i]*i; printf("%lld ",A[i]); } }

Compilation message (stderr)

prosjek.cpp: In function 'int main()':
prosjek.cpp:6:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&n);
         ~~~~~^~~~~~~~~
prosjek.cpp:8:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
             scanf("%lld",&B[i]);
             ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...