#607. 【入门】求1/1+1/2+2/3+3/5+5/8+8/13+13/21……的前n项的和
【入门】求1/1+1/2+2/3+3/5+5/8+8/13+13/21……的前n项的和
说明
求1/1+1/2+2/3+3/5+5/8+8/13+13/21+21/34……的前n项的和。输入格式
第1行:一个整数n(1 <= n <= 30 )。输出格式
一行:一个小数,即前n项之和(保留3位小数)。20
12.660
20
12.660
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.