Submission #54327825
Source Code Expand
#!/usr/bin/env python3
def main():
N, M = map(int, input().split())
H = list(map(int, input().split()))
ans = 0
temp = 0
for i in range(N):
temp += H[i]
if temp > M:
break
else:
ans += 1
print(ans)
if __name__ == '__main__':
main()
Submission Info
| Submission Time | |
|---|---|
| Task | A - Sanitize Hands |
| User | rutent |
| Language | Python (PyPy 3.10-v7.3.12) |
| Score | 100 |
| Code Size | 343 Byte |
| Status | AC |
| Exec Time | 55 ms |
| Memory | 76668 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| 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 | 54 ms | 76388 KiB |
| example_01.txt | AC | 55 ms | 76584 KiB |
| example_02.txt | AC | 54 ms | 76628 KiB |
| hand_00.txt | AC | 55 ms | 76480 KiB |
| hand_01.txt | AC | 54 ms | 76668 KiB |
| hand_02.txt | AC | 54 ms | 76252 KiB |
| hand_03.txt | AC | 54 ms | 76316 KiB |
| hand_04.txt | AC | 54 ms | 76152 KiB |
| hand_05.txt | AC | 54 ms | 76460 KiB |
| random_00.txt | AC | 54 ms | 76512 KiB |
| random_01.txt | AC | 54 ms | 76636 KiB |
| random_02.txt | AC | 54 ms | 76512 KiB |
| random_03.txt | AC | 54 ms | 76492 KiB |
| random_04.txt | AC | 54 ms | 76484 KiB |
| random_05.txt | AC | 54 ms | 76372 KiB |
| random_06.txt | AC | 55 ms | 76636 KiB |
| random_07.txt | AC | 55 ms | 76464 KiB |
| random_08.txt | AC | 54 ms | 76560 KiB |
| random_09.txt | AC | 55 ms | 76640 KiB |