Submission #95559

#TimeUsernameProblemLanguageResultExecution timeMemory
95559oolimryTarifa (COCI16_tarifa)C++14
50 / 50
2 ms380 KiB
#include <bits/stdc++.h> using namespace std; int main() { int x, n; scanf("%d %d",&x,&n); x *= (n+1); for(int i =0;i < n;i++){ int a; scanf("%d",&a); x -= a; } printf("%d",x); }

Compilation message (stderr)

tarifa.cpp: In function 'int main()':
tarifa.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&x,&n);
     ~~~~~^~~~~~~~~~~~~~~
tarifa.cpp:13:10: 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...