题目描述

Calculate the value of π from the infinite series
$\pi=4-\frac{4}{3}+\frac{4}{5}-\frac{4}{7}+\frac{4}{9}-\frac{4}{11}+\cdots$
Print a table that shows the approximate value of π after each of the first 1000 terms of this series.


输入格式

No need for input. You are required to print a table.


输出格式

// set floating-point number format
cout << fixed << setprecision( 8 );


样例数据

输入


                            

输出

1 4.00000000
2 2.66666667
3 3.46666667
4 2.89523810
5 3.33968254
6 2.97604618
7 3.28373848
8 3.01707182
9 3.25236593
10 3.04183962
(NOTE: Only 10 items are shown here, you need to output 1000 items)

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解