F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Volume of a cylinder

Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 798    Accepted Submission(s): 270


Problem Description
One cylinder across another cylinder at right angles, tell the volume of the intersection of the cylinders.
 

Input
Multiple test cases, the number of them T is given in the very first line.
For each test case, two integers r1 and r2, meaning the radius of the two cylinders. ( 1 < r1, r2 < 80 )
 

Output
For each case, output the answer rounded to 2 digits after the decimal point.
 

Sample Input
1 4 4
 

Sample Output
341.33
 

Author
yifenfei
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-04-01 06:54:44, Gzip enabled