#T644. 小Tu的药丸

小Tu的药丸

Description

【Problem Background】

Little Tu is sick and has some pills at home.

【Problem Description】

Little Tu has been sick for i days. There are 5 types of pills at home, and it is known that the diameter of each pill is less than 1 cm (excluding 1 cm, with only 1 decimal place). A pill with diameter x can cure 10x days of illness. What is the minimum number of pills Little Tu needs to take to recover?

(Requirement: The effect of the pills must last exactly until the day Little Tu recovers, ignoring hours and minutes.)

Input Format

First line: Input an integer i, representing the number of sick days;

Second line: Input 5 decimals, representing the diameters of the pills, separated by spaces (only 1 decimal place is required, e.g., 0.1, 0.2, etc.)

Output Format

An integer n, representing the minimum total number of pills Little Tu needs to take.

```input1 7 0.1 0.2 0.4 0.8 0.9 ``` ```output1 3 ``` ```input2 18 0.2 0.5 0.6 0.8 0.9 ``` ```output2 2 ``` ## Hint

【Sample 1 Explanation】

Given that Little Tu is sick for 7 days, the durations of the five types of pills are 1 day, 2 days, 4 days, 8 days, and 9 days, respectively.

Therefore, the minimum number of pills Little Tu needs to take is 3, with diameters of 0.1cm, 0.2cm, and 0.4cm.

【Data Range】

1 ≤ i ≤ 3650

【Hint】

All samples guarantee that the diameters of the five types of pills are distinct, and a solution is always guaranteed.

【Luogu Link】

Click to jump