#CCBCHBA0000115. S Sequence II
S Sequence II
S Sequence II
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Calculate $S=1+\frac32+\frac54+\frac78+\cdots+\frac{39}{2^{19}}$. Numerators increase by 2 from 1 to 39 and denominators double from 1. Print the value rounded to exactly two decimal places.
Input
There is no input.
Output
Print one line with exactly two decimal places.
Subtasks
-
Subtask 1 (20%): No input; the same empty input is used for scoring groups.
-
Subtask 2 (30%): No input; the same empty input is used for scoring groups.
-
Subtask 3 (50%): No input; the same empty input is used for scoring groups.
Examples
Example 1
Input:
Output:
6.00
Explanation:
Sum 20 fractions with odd numerators 1 through 39 and denominators doubling from 1; print two decimals.