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 1138. Integer Percentage

Is this test possible?
Posted by Diac Paul 12 Oct 2004 00:18
n=111 s=110
There is no sequence that that leads form 110 to 111. Is it possible such test? I got WA on test 2 and really don't know why. Are this correct?:
input
400 100
output
7
------
123 14
9
------
333 2
20
------
1000 67
11
------
5678 567
8
------
9800 100
22
------

   Thanks
Re: Is this test possible?
Posted by Roman Lipovsky 31 Oct 2004 16:17
Latest salary (!) did not exceed n. It means that latest
salary can be equal or less than n.

Correct answers for your tests:

1) n = 111, s = 110
answer: 1 (110 - first and latest salary)

2) n = 400, s = 100
answer: 8

3) n = 123, s = 14
answer: 7

4) n = 333, s = 2
answer: 20

5) n = 1000, s = 67
answer: 7

6) n = 5678, s = 567
answer: 6

7) n = 9800, s = 100
answer: 23
Re: Is this test possible?
Posted by Neptun 26 Oct 2007 08:32
Thank you very much!I had the same mistake.....How fooooool I was!!!