ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1131. Copying

Time limit exceeded on test #8
Posted by !fb 3 Jul 2009 21:56
Where can be error?
#include <iostream>
int main()
{
    int k,s,t=0;
    scanf("%d%d",&k,&s);
    for (long int p=1; p<k; t++)
        p+=(p>s)?s:p;
    printf("%ld",t);
    return 0;
}
[Re: Time limit exceeded on test #8]Try this
Posted by snowfly 8 Aug 2009 09:21
I think you can try this one:
[code deleted]

Edited by moderator 24.11.2019 12:47
Re: Time limit exceeded on test #8
Posted by x-positive 5 Mar 2012 04:19
Try this test:

input: 1000000000 1
output: 999999999

Time is money ;)