#P1920. Series Sum Calculation
Series Sum Calculation
Series Sum Calculation
Void_rank mistakenly grabbed a high school mathematics magazine titled "Success Code" instead of his intended magazine and now faces a peculiar mathematical challenge. Your task is to help him solve the following series:
\[ S = \sum_{i=1}^{N}\frac{x^{i}}{i} \]
Given two numbers, N (an integer) and x (a real number), compute the value of the series up to the N-th term.
inputFormat
The input consists of a single line containing two values separated by space: an integer N (the number of terms) and a real number x.
outputFormat
Output a single line containing the computed sum of the series. The output should be formatted to 6 decimal places.
sample
1 2
2.000000