printРабочее место участника

printЗадачи

847. Heads

Ограничения: время – 1s/2s, память – 32MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

O.Bender and K.Vorob'yaninov like to play tossing coins. If all coins lie heads up then Kisah wins else Ostap wins. Calculate the probability of Kisah's win.
The probability of `n` heads in a row tossing a fair coin is `2^{-n}`.
Input
`r` lines containing each one an integer number `n`. The values of `r` and `n` are as follows: `0\ <\ r\ ≤\ 10`, `0\ <\ n\ ≤\ 9000`.
Output
Print `r` lines each with the value of `2^{-n}` for the given values of `n`, using the format:

2^-`n` = `x`.`"xxx"`E-`y`

where each `x` is a decimal digit and each `y` is a decimal integer with no leading zeroes or spaces.

Input Sample

8271
6000
1

Output Sample

2^-8271 = 1.517E-2490
2^-6000 = 6.607E-1807
2^-1 = 5.000E-1
loading