A Calculus【GDUT 2022 grade Qualifying #1】

A Calculus

Chipmunk is a math genius, and he is extraordinarily good at calculus.

Now Chipmunk gives you a formula and asks you to calculate it in one minute, or you should treat him to dinner. The formula looks like this:
\(\int_{0}^{2 \pi} \frac{\mathrm{d} x}{\left(1+\sin ^{2} x\right) \sqrt{2-\sin ^{2} x}}\)
Obviously it is impossible to get the accurate answer, so Chipmunk only requires you to tell him the integer part of it.

Input
It can be anything, and has nothing to do with the answer.

Output
Print an integer n (1≤n≤5), representing the answer to the problem above.

Example
input
The probability that Awson is god
output
1
Note
Of course Chipmunk will not tell you the correct answer in the example above!

题意

求积分的近似值的整数位

题解

image

收获

  1. 积分可以取小区间求和得到近似值
  2. 题目只需要要整数位,因此可以通过放缩求近似
posted @ 2023-03-05 14:50  Keith-  阅读(70)  评论(0编辑  收藏  举报