Suika can control the density of everything. Can your program do the same thing?
If a program runs for $T$ ms and its memory usage is $M$ KB, let's define the density of the program to be $D=\frac{M}{T+1}$
Your task is to write a program so that its density is as close to the number given as possible.
Write a program that:
$D$, a double with at most 3 digits after decimal point, $8\leq D\leq 262,000$
A single integer.
[In]
667
[Output]
123
[Explain]
Suppose it runs for 15ms, memory usage is 10000KB, then its density is 666.67 which is a bullseye.
There are 20 testcases.
Assume your program's density is $D'$ and $x=|D'-D|$. The score is defined as follow for each testcase:
X | Rank | Score |
---|---|---|
<=1 | Bullseye | 100 |
<=10 | SSS | 25 |
<=20 | SS | 20 |
<=30 | S | 10 |
<=100 | A | 8 |
<=500 | B | 6 |
<=1000 | C | 4 |
<=262000 | D | 1 |
>262000 | D++ | 250 |