Submission #20229

#TimeUsernameProblemLanguageResultExecution timeMemory
20229leporem91Prosjek (COCI14_prosjek)C++98
50 / 50
2 ms0 KiB
#include <stdio.h> #include <algorithm> using namespace std; #define MAXN 105 int N; int main(void) { scanf("%d", &N); long long sum = 0; for (long long i = 1; i <= N; i++) { long long n; scanf("%lld", &n); long long v = n*i-sum; printf("%lld ", v); sum += v; } return 0; }

Compilation message (stderr)

prosjek.cpp: In function 'int main()':
prosjek.cpp:9:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &N);
                 ^
prosjek.cpp:13:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   long long n; scanf("%lld", &n);
                                 ^
#Verdict Execution timeMemoryGrader output
Fetching results...