Submission #392817

#TimeUsernameProblemLanguageResultExecution timeMemory
392817rainboyProsjek (COCI14_prosjek)C11
50 / 50
1 ms280 KiB
#include <stdio.h> #define N 100 int main() { static long long aa[N]; int n, i; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%lld", &aa[i]); aa[i] *= i + 1; } for (i = n - 1; i > 0; i--) aa[i] -= aa[i - 1]; for (i = 0; i < n; i++) printf("%lld ", aa[i]); printf("\n"); return 0; }

Compilation message (stderr)

prosjek.c: In function 'main':
prosjek.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    9 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
prosjek.c:11:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   11 |   scanf("%lld", &aa[i]);
      |   ^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...