Submission #80531

#TimeUsernameProblemLanguageResultExecution timeMemory
80531pzdbaTarifa (COCI16_tarifa)C++14
50 / 50
2 ms848 KiB
#include <bits/stdc++.h> using namespace std; int a[105]; int main(){ int x, n, a; scanf("%d%d", &x, &n); int ans = 0; for(int i=1;i<=n;i++){ scanf("%d", &a); ans += x; ans -= a; } printf("%d\n", ans+x); }

Compilation message (stderr)

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