CPU time

A program runs IC instructions with an average of CPI cycles each, on a processor with a clock of G gigahertz. Print its CPU time in milliseconds.

Input

One line: IC (a whole number, 1 to 10¹²), CPI and G (decimal numbers above 0).

Output

The CPU time in milliseconds, with 3 decimal places.

Examples

Example 1 · Input
1000000000 2 2
Expected output
1000.000
Example 2 · Input
500000 1.5 3
Expected output
0.250

Prompts inside input() are ignored when checking, so input("n: ") is fine.

Hints

Hint 1

CPU time in seconds = instructions × CPI ÷ (clock rate in Hz).

Hint 2

1 GHz is 10⁹ Hz, and 1 second is 1000 ms.

Hint 3

Print with f"{ms:.3f}".

Solution

Show one correct solution (try it yourself first)
ic, cpi, g = input().split()
seconds = int(ic) * float(cpi) / (float(g) * 1e9)
print(f"{seconds * 1000:.3f}")

Lesson: Measuring performance →