PROGRAMMING:Finding approximate sum of square and reciprocal sequence
This problem requires the programming of two positive integers m and n (m ≤ n) to calculate the approximate sum of sequences. The approximate sum is defined as the largest integer less than the sequence sum( Tip: use floor function)
$$m^{2}$$+1/m+$$(m+1)^{2}$$+1/(m+1)+⋯+$$n^{2}$$+1/n。
###Input format:
The input gives two positive integers m and n (m ≤ n) in one line, separated by spaces.
###Output format:
Output approximate sum s in the format of "sum ≈ s" in one line.
###Input example:
Here is a set of inputs. For example:
```in
5 10
```
###Output example:
The corresponding output is given here. For example:
```out
sum ≈ 355
```
answer:If there is no answer, please comment
```
import math
m,n=input().split()
m,n=int(m),int(n)
s=sum([i*i+1/i for i in range(m,n+1)])
print("sum ≈ {}".format(math.floor(s)))
```
$$m^{2}$$+1/m+$$(m+1)^{2}$$+1/(m+1)+⋯+$$n^{2}$$+1/n。
###Input format:
The input gives two positive integers m and n (m ≤ n) in one line, separated by spaces.
###Output format:
Output approximate sum s in the format of "sum ≈ s" in one line.
###Input example:
Here is a set of inputs. For example:
```in
5 10
```
###Output example:
The corresponding output is given here. For example:
```out
sum ≈ 355
```
answer:If there is no answer, please comment
```
import math
m,n=input().split()
m,n=int(m),int(n)
s=sum([i*i+1/i for i in range(m,n+1)])
print("sum ≈ {}".format(math.floor(s)))
```