The Lazy Girlfriend
All submissions for this problem are available.Sunny works for a start-up as a software developer. She is quite lazy, just like other coding nerds and spends a lot of time in talking with her boyfriend Alex for hours. Sunny’s boss came to know about this and being jealous of her boyfriend, he assigned tons of tasks to Sunny asking her to complete them within the deadline of some hours. Sunny accepted the tasks but she has a problem. Sunny needs to complete $M$ number of tasks in $N$($N>=M$)hours and to her surprise, these tasks take exactly one hour to complete. Sunny needs $K$ hours to talk to her boyfriend badly after every $L$ hours of time.Sunny’s boss has warned her to show the outputs of her works as soon as the deadline ends. Determine using your code, how many tasks $P$ Sunny can complete before the deadline exceeds. ###INPUT - First line contains the number of test cases $T$. - Next $T$ lines has input $M$,$N$,$K$,$L$ in succession. ###OUTPUT A single integer $P$($≤$ $M$) denoting the number of tasks that sunny was able to complete. ###Sample Input: 2 5 6 1 1 5 6 1 1.5 ###Sample Output: 3 4
|Time Limit:||0.1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, RUBY, PHP, GO, NODEJS, SCALA, swift, FORT, JS, SQL, kotlin, PYP3, R|
Fetching successful submissions
If you are still having problems, see a sample solution here.