D. 2021SSOI五年级第四题 听歌(0.8)

    Type: Default 1000ms 128MiB

2021SSOI五年级第四题 听歌(0.8)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

小珊很喜欢音乐。一天,她把喜欢的n首歌加入了播放清单,每首歌长度为ai (1≤i≤n) 秒,小珊想知道k秒时正在播放第几首歌?

输入格式

第一行2个整数 n,k;表示歌曲数量和提问的时间k;

第二行为n个整数,表示每首歌的长度。

输出格式

一个整数,表示题目中所提时间正在播放第几首歌。

3 40
50 30 20
1

提示

【输入样例 2】

3 80



50 30 20
【输出样例 2】

2



【数据范围】

1≤n,ai≤10000k不超所有歌曲总时间;

来源

计算

2021年狮山镇赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
6
Start at
2025-12-9 12:00
End at
2025-12-13 16:00
Duration
100 hour(s)
Host
Partic.
31