Time limit: 1 second Memory limit: 256 MB Numbers can be displayed in different ways.…
- User
Time limit: 1 second Memory limit: 256 MB Numbers can be displayed in different ways. For example, it can be shown in decimal, Roman, base two and...!
In this question, we are dealing with two types of scientific display and seven segment digital screen display.
In the scientific representation, the number is written in two parts, one part is a decimal number that has exactly one digit more than zero before the comma (and if it does not have a comma, it is a single digit), the first part and the second part by one character e e are separated and the second part is a non-negative integer. In this case, if the first part of the number a a and the second part of the number b Let b be our real number a x 1 0 b a x 10 b is According to this definition 0.3 e 10 0.3e10 is not a science show and should be 3 e 9 3e9 be written and also 2 e 0 2e0 represents the number 2 2 and 2.33 e 3 2.33e3 expressing the number 2330 It is 2330.
In the seven segment display that exists on the digital screens, 7 LED lights are placed as shown below, which can display different numbers from 0 to 9, and to display a number k k digits must be from k k to use these 7 segments.
Description of the image
We define the amount of electricity required to display a number equal to the number of lights that are required to display it.
In this question, you are given a natural number greater than 0 in a valid scientific representation, and you have to say how many units of electricity will be consumed if we display this number on a digital screen.
input To you the string s s is given as input, which is a valid scientific representation of a natural number.
3 ≤ ∣ s ∣ ≤ 10 3≤∣s∣≤10
output In the only output line, output the amount of power consumed to display 7 segments.
Example Sample entry 1 2.3e10 Plain text Sample output 1 64 Plain text Sample input 2 8e10000000 Plain text Sample output 2 60000007 Plain text Sample entry 3 9e0 Plain text Sample output 3 6 write in java17
- Assistant