编程介的小学生 2017-08-31 15:34 采纳率: 20.5%
浏览 740
已采纳

Calculate the Integral

Define the following functions:

Given integer N (1 <= n <= 100) and {an} {bn}, for 1 <= i <= N, define:

and

calculate the integral:

Input

A line containing only the integer N is given first.

Then N lines follow, each line has two float-point number Ai and Bi.

There are several test cases, so process to the end of file.

Output

For each testcase, output a line containing only the integer N first.

Then output a second line containing the result of the integral.

The result should be printed in scientific format which has a precision of 10 digits after radix point.

Sample Input

1
0 2
2
1 3
0 4
3
2 4
1 5
0 6

Sample Output

1
0.0000000000e+000
2
8.0000000000e+000
3
7.2000000000e+001

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-09-15 15:46
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏