Submission #439778

#TimeUsernameProblemLanguageResultExecution timeMemory
439778rainboyTarifa (COCI16_tarifa)C11
50 / 50
1 ms204 KiB
#include <stdio.h>

int main() {
	int n, ans;

	scanf("%d%d", &ans, &n), ans *= (n + 1);
	while (n--) {
		int x;

		scanf("%d", &x);
		ans -= x;
	}
	printf("%d\n", ans);
	return 0;
}

Compilation message (stderr)

tarifa.c: In function 'main':
tarifa.c:6:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |  scanf("%d%d", &ans, &n), ans *= (n + 1);
      |  ^~~~~~~~~~~~~~~~~~~~~~~
tarifa.c:10:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |   scanf("%d", &x);
      |   ^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...