Submission #51563528


Source Code Expand

n, k = map(int, input().split())
a = list(map(int, input().split()))

a = set(a)
ans = k * (k + 1) // 2
ans -= sum(i for i in a if i <= k and i > 0)
print(ans)

Submission Info

Submission Time
Task C - Σ
User yefllower
Language Python (PyPy 3.10-v7.3.12)
Score 250
Code Size 167 Byte
Status AC
Exec Time 117 ms
Memory 146680 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 3
AC × 22
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 03_handmade_00.txt, 03_handmade_01.txt, 03_handmade_02.txt, 03_handmade_03.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 56 ms 76532 KiB
00_sample_01.txt AC 56 ms 76444 KiB
00_sample_02.txt AC 57 ms 76532 KiB
01_random_00.txt AC 95 ms 120956 KiB
01_random_01.txt AC 117 ms 146416 KiB
01_random_02.txt AC 99 ms 136228 KiB
01_random_03.txt AC 108 ms 146216 KiB
01_random_04.txt AC 76 ms 91264 KiB
01_random_05.txt AC 111 ms 143276 KiB
01_random_06.txt AC 93 ms 127492 KiB
01_random_07.txt AC 108 ms 143248 KiB
01_random_08.txt AC 93 ms 124044 KiB
01_random_09.txt AC 116 ms 146680 KiB
01_random_10.txt AC 76 ms 101396 KiB
01_random_11.txt AC 108 ms 146272 KiB
02_random2_00.txt AC 102 ms 145676 KiB
02_random2_01.txt AC 104 ms 145816 KiB
02_random2_02.txt AC 103 ms 145388 KiB
03_handmade_00.txt AC 83 ms 114076 KiB
03_handmade_01.txt AC 83 ms 114052 KiB
03_handmade_02.txt AC 93 ms 142896 KiB
03_handmade_03.txt AC 95 ms 143380 KiB