CF884A.Book Reading

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Recently Luba bought a very interesting book. She knows that it will take tt seconds to read the book. Luba wants to finish reading as fast as she can.

But she has some work to do in each of nn next days. The number of seconds that Luba has to spend working during ii -th day is aia_{i} . If some free time remains, she can spend it on reading.

Help Luba to determine the minimum number of day when she finishes reading.

It is guaranteed that the answer doesn't exceed nn .

Remember that there are 86400 seconds in a day.

输入格式

The first line contains two integers nn and tt ( 1<=n<=1001<=n<=100 , 1<=t<=1061<=t<=10^{6} ) — the number of days and the time required to read the book.

The second line contains nn integers aia_{i} ( 0<=ai<=864000<=a_{i}<=86400 ) — the time Luba has to spend on her work during ii -th day.

输出格式

Print the minimum day Luba can finish reading the book.

It is guaranteed that answer doesn't exceed nn .

输入输出样例

  • 输入#1

    2 2
    86400 86398
    

    输出#1

    2
    
  • 输入#2

    2 86400
    0 86400
    

    输出#2

    1
    
首页