-->
当前位置:首页 > 题库

PROGRAMMING:Finding the partial sum of square and reciprocal sequence

Luz5年前 (2021-05-10)题库541
This problem requires two positive integers $$M $$and $$n $$($$m / Le n $$) to write programs to calculate the sequence and $$m ^ 2 + 1 / M + (M + 1) ^ 2 + 1 / (M + 1) + cdots + n ^ 2 + 1 / N $$.
###Input format:
The input gives two positive integers $$M $$and $$n $$($$m / Le n $$) in one line, separated by spaces.
###Output format:
In one line, output the value s of partial sum in the format of "sum = s", accurate to six decimal places. The calculation results should not exceed the double precision range.
###Input example:
```in
5 10
```
###Output example:
```out
sum = 355.845635
```






answer:If there is no answer, please comment