# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
80531 | 2018-10-21T08:16:21 Z | pzdba | Tarifa (COCI16_tarifa) | C++14 | 2 ms | 848 KB |
#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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 504 KB | Output is correct |
2 | Correct | 2 ms | 644 KB | Output is correct |
3 | Correct | 2 ms | 644 KB | Output is correct |
4 | Correct | 2 ms | 724 KB | Output is correct |
5 | Correct | 2 ms | 732 KB | Output is correct |
6 | Correct | 2 ms | 744 KB | Output is correct |
7 | Correct | 2 ms | 744 KB | Output is correct |
8 | Correct | 2 ms | 744 KB | Output is correct |
9 | Correct | 2 ms | 796 KB | Output is correct |
10 | Correct | 2 ms | 848 KB | Output is correct |