Submission #6022282
Source Code Expand
parseInt(x) = parse(Int,x)
function main()
n, x = map(parseInt, split(readline()))
a = map(parseInt, split(readline()))
ans = 1
d = 0
for i in 1:n
d += a[i]
if d > x
break
end
ans += 1
end
println(ans)
end
main()
Submission Info
| Submission Time | |
|---|---|
| Task | B - Bounding |
| User | tossy |
| Language | Julia (0.5.0) |
| Score | 200 |
| Code Size | 307 Byte |
| Status | AC |
| Exec Time | 354 ms |
| Memory | 110284 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s1.txt, s2.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, s1.txt, s2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 350 ms | 107624 KiB |
| 02.txt | AC | 351 ms | 108468 KiB |
| 03.txt | AC | 351 ms | 108144 KiB |
| 04.txt | AC | 354 ms | 107800 KiB |
| 05.txt | AC | 350 ms | 106372 KiB |
| 06.txt | AC | 352 ms | 107544 KiB |
| 07.txt | AC | 352 ms | 107952 KiB |
| 08.txt | AC | 351 ms | 109584 KiB |
| 09.txt | AC | 349 ms | 110224 KiB |
| 10.txt | AC | 352 ms | 107716 KiB |
| 11.txt | AC | 352 ms | 109784 KiB |
| 12.txt | AC | 351 ms | 108164 KiB |
| 13.txt | AC | 352 ms | 110284 KiB |
| 14.txt | AC | 351 ms | 108204 KiB |
| 15.txt | AC | 349 ms | 109332 KiB |
| s1.txt | AC | 351 ms | 108068 KiB |
| s2.txt | AC | 351 ms | 109348 KiB |