CodeChef Solution

Selling Insurance CodeChef Solution

We Are Discuss About CODECHEF SOLUTION

Selling Insurance CodeChef Solution

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Problem

Chef has started a new job as an insurance agent.
Each insurance costs  dollars and Chef gets a 20% commission on selling each insurance.

Find the minimum number of insurances Chef needs to sell to earn at least 100 dollars.

Input Format

  • The first line of input will contain a single integer , denoting the number of test cases.
  • Each test case consists of a single integer , the cost of an insurance.

Output Format

For each test case, output on a new line, the minimum number of insurances Chef needs to sell to earn at least 100 dollars.

Constraints

  • 1≤�≤100
  • 1≤�≤100

Sample 1:

Input

Output

4
20
80
1
5
25
7
500
100

Explanation:

Test case 1: On selling 1 insurance, Chef earns 20% of 20, which is, 4 dollars. This means that Chef needs to sell 25 insurances to earn 25⋅4=100 dollars.

Test case 2: On selling 1 insurance, Chef earns 20% of 80, which is, 16 dollars.
On selling 6 insurances, Chef will earn 16⋅6=96 dollars. Thus, he would need to sell a minimum of 7 insurances to earn at least 100 dollars.

Test case 3: On selling 1 insurance, Chef earns 20% of 1, which is, 0.2 dollars. This means that Chef needs to sell 500 insurances to earn 500⋅0.2=100 dollars.

Test case 4: On selling 1 insurance, Chef earns 20% of 5, which is, 1 dollars. This means that Chef needs to sell 100 insurances to earn 100⋅1=100 dollars.

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram


6 digit code appear after 69 seconds.
 

Wait for Solution



Yhaa You have done it but next? if YOU Want to Get Others Please Visit Here ScishowEngineer   Then Follow US HERE and Join Telegram.

If You Want To Learn Something New Then Visit Our Official Channel YOUTUBE