#K45532. Expected Free Throw Points
Expected Free Throw Points
Expected Free Throw Points
In this problem, you are given the number of free throw attempts ( n ) and the probability ( p ) of making each shot. The expected total points is defined by the formula ( E = n \times p ). Your task is to compute ( E ) and print the result rounded to two decimal places. This simulation reflects the average score that can be expected when attempting free throws under controlled probabilities.
inputFormat
The input consists of two space-separated values: an integer ( n ) representing the number of free throw attempts (e.g., ( 1 \leq n \leq 10^7 )), and a floating-point number ( p ) representing the probability of scoring on each attempt (( 0.0 \leq p \leq 1.0 )).
outputFormat
Output the expected total points as a floating-point number rounded to two decimal places.## sample
10 0.6
6.00