Created
July 22, 2021 08:34
-
-
Save monchy-monchy/ba5d40fc312d7663a6266bbfd7c0116b to your computer and use it in GitHub Desktop.
ABC151 B - Achieve the Goal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N, K, M = list(map(int, input().split())) | |
A = list(map(int, input().split())) | |
X = M*N -sum(A) | |
if X <= K: | |
if X >= 0: | |
print(X) | |
else: | |
print(0) | |
else: | |
print(-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment