BHAGO - Professional Stalker

no tags 

Abid is a professional stalker. He stalks so many people on social media everyday. However he has other things to do, so he do not stalk infinite number of people everyday. To be more precise, he do not stalk more than 90 people in a day. (90 is the number of  expected students in each classroom in IUT, Coincidence!). However, he can stalk any number of people between 0 to 90 inclusive in a day. An interesting fact is that there are 10 intervals,

[1, 5], [6, 10], [11, 21], [22, 34], [35, 51], [52, 62], [63, 69], [70, 76], [77, 85], [86, 90].

In this ten intervals each of them has the same possibility that the number of people Abid stalked on that day lies on that interval. Or more clearly, at the beginning of the day each of the interval has 10% of probability that the number of people Abid stalked on that day is inside this limit.

Now, before you woke up in the morning, Abid already stalked x peoples on social media. You'll have to find the expected number of peoples he is going to stalk on that day after you wake up.

Note: Abid can not stalk fraction of a person.

Input

First line contains an integer 0 < t <= 90, number of testcases,

The next t lines contain one integer x (0 <= x <= 90) each, number of people he already stalked before you woke up.

Output

For each testcase on each line print the expected number of people he is going to stalk on that day after you wake up.

Example

Input:
3
0
90
36

Output:
46
0
32

hide comments
[Rampage] Blue.Mary: 2018-12-06 04:39:48

Agree with @defrager. "Or more clearly, each of the interval has 10% of probability that the number of people abid stalked on that day is inside his limit." This sentence is very misleading, problem solvers should omit this.

Oleg: 2018-12-01 02:48:17

Hint: Got accepted result after assumed that problem is different - first Abid stalks X people and then he gets probabilities that already include assumption that X people were stalked.

Jacob Plachta: 2018-11-22 03:28:00

How should the answer be rounded? Down, or to the nearest integer (in which case, what if the answer evaluates to something like exactly 0.5)?

Absolute or relative error are normally allowed for problems with real-valued answers such as this one, to eliminate issues with a lack of clarity or language differences.

:::: reply: while calculating the total number of stalks , You should round it down as he can't stalk fraction of people.[in the problem statement] eg for 89, expected value should be 89.5. So he will stalk 89 peoples and your code should output 0

Last edit: 2018-11-30 17:31:10

Added by:Safayet
Date:2018-11-19
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All