Submission #9460313


Source Code Expand

Copy
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,K,M,*A = map(int,read().split())

x = N * M - sum(A)

if x > K:
    print(-1)
else:
    print(max(0, x))

Submission Info

Submission Time
Task B - Achieve the Goal
User maspy
Language Python (3.4.3)
Score 200
Code Size 235 Byte
Status AC
Exec Time 17 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 26
Set Name Test Cases
Sample sample_01, sample_02, sample_03
All hand_01, hand_02, hand_03, hand_04, max_01, max_02, max_03, min_01, random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, random_10, random_11, random_12, random_13, random_14, random_15, sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
hand_01 AC 17 ms 2940 KB
hand_02 AC 17 ms 3060 KB
hand_03 AC 17 ms 2940 KB
hand_04 AC 17 ms 2940 KB
max_01 AC 17 ms 2940 KB
max_02 AC 17 ms 2940 KB
max_03 AC 17 ms 2940 KB
min_01 AC 17 ms 2940 KB
random_01 AC 17 ms 2940 KB
random_02 AC 17 ms 2940 KB
random_03 AC 17 ms 2940 KB
random_04 AC 17 ms 2940 KB
random_05 AC 17 ms 2940 KB
random_06 AC 17 ms 2940 KB
random_07 AC 17 ms 2940 KB
random_08 AC 17 ms 3060 KB
random_09 AC 17 ms 2940 KB
random_10 AC 17 ms 2936 KB
random_11 AC 17 ms 2940 KB
random_12 AC 17 ms 2940 KB
random_13 AC 17 ms 2940 KB
random_14 AC 17 ms 3060 KB
random_15 AC 17 ms 2940 KB
sample_01 AC 17 ms 2940 KB
sample_02 AC 17 ms 3060 KB
sample_03 AC 17 ms 2940 KB