Submission #12085959


Source Code Expand

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

N, M, *A = map(int, read().split())
x = N - sum(A)
print(x if x >= 0 else -1)

Submission Info

Submission Time
Task B - Homework
User maspy
Language Python (3.8.2)
Score 200
Code Size 203 Byte
Status
Exec Time 23 ms
Memory 9924 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01, sample_02, sample_03, sample_04
All 200 / 200 hand_01, hand_02, random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, random_10, sample_01, sample_02, sample_03, sample_04
Case Name Status Exec Time Memory
hand_01 19 ms 9156 KB
hand_02 17 ms 8860 KB
random_01 19 ms 9924 KB
random_02 20 ms 9184 KB
random_03 22 ms 9364 KB
random_04 19 ms 9232 KB
random_05 17 ms 8980 KB
random_06 23 ms 9156 KB
random_07 17 ms 9100 KB
random_08 19 ms 9544 KB
random_09 18 ms 9488 KB
random_10 18 ms 9488 KB
sample_01 19 ms 8864 KB
sample_02 18 ms 9160 KB
sample_03 17 ms 9100 KB
sample_04 16 ms 9028 KB