荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: huhaiming (一生只爱她), 信区: Program
标  题: problem G
发信站: 荔园晨风BBS站 (Sat May 24 20:07:39 2003), 站内信件


Calculate the Integral


Time limit: 1 Seconds   Memory limit: 32768K
Total Submit: 0   Accepted Submit: 0

------------------------------------------------------------------------
--------

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


Author: SHI, Xiaohan



------------------------------------------------------------------------
--------

Submit   Back   Status

------------------------------------------------------------------------
--------

Zhejiang University Online Judge V1.0
--

菩提本无树,明镜亦非台

本来无一物,何处惹尘埃

※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.0.200]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店