Submission #54324889


Source Code Expand

N, M = map(int, input().split())
H = list(map(int, input().split()))
cnt = 0
m = M
for h in H:
    m -= h
    if m >= 0:
        cnt += 1
    else:
        break
print(cnt)

Submission Info

Submission Time
Task A - Sanitize Hands
User tk1311
Language Python (PyPy 3.10-v7.3.12)
Score 100
Code Size 184 Byte
Status AC
Exec Time 55 ms
Memory 76708 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 19
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt
Case Name Status Exec Time Memory
example_00.txt AC 53 ms 76456 KiB
example_01.txt AC 55 ms 76584 KiB
example_02.txt AC 55 ms 76304 KiB
hand_00.txt AC 55 ms 76696 KiB
hand_01.txt AC 54 ms 76184 KiB
hand_02.txt AC 54 ms 76708 KiB
hand_03.txt AC 54 ms 76268 KiB
hand_04.txt AC 54 ms 76408 KiB
hand_05.txt AC 54 ms 76392 KiB
random_00.txt AC 54 ms 76288 KiB
random_01.txt AC 54 ms 76228 KiB
random_02.txt AC 54 ms 76588 KiB
random_03.txt AC 54 ms 76272 KiB
random_04.txt AC 54 ms 76480 KiB
random_05.txt AC 54 ms 76224 KiB
random_06.txt AC 54 ms 76596 KiB
random_07.txt AC 54 ms 76468 KiB
random_08.txt AC 54 ms 76372 KiB
random_09.txt AC 53 ms 76452 KiB