| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12730 | Variable Operation |
|
Description
Given 4 lines of text, you need to parse it and perform data operations to fit the requirement.
Hint
You may also need the function round() to limit the digit numbers of float.
An example is shown below where 5.123456 is the original number and 1 (or 2) is the number of digits to preserve.
>>> print(round(5.123456, 1))
5.1>>> print(round(5.123456, 2))
5.12Input
4 lines of text with the following syntax:
e1
e2
e3
e4
where e1, ... , e4 represented 4 elements from given text.
Output
A line of text with the following operations:
e1 multiply e2 plus e4 multiply e3
Note that the details of the operations are:
- e1 multiply e2 should be numbered multiplication and round the multiplication to only first decimal
- e4 multiply e3 should be the string multiplication
- e1, e2, e3 are considered as numbers, while e4 is a word.