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

Electron Cloud

The electron is described in terms of its probability distribution or probability density. This probability distribution does not have definite cutoff points; its edges are somewhat fuzzy. Hence the term "electron cloud." This cloudy probability distribution takes on different shapes, depending on the state of the atom.

In order to describe a nuclear action, you are asked to tell where the electrons may occur.

Here we assume that the electrons only occur within a sphere whose location and radius are given. The action consists of only two atoms.

Input

There are multiple test cases. The first line of input is an integer T indicating the number of test cases. (0 < T ≤ 50)

Each test case consists of a line containing 8 integers X1, Y1, Z1, R1, X2, Y2, Z2 and R2, describing the coordinates and the radiuses of the two atoms. The absolute value of each coordinate do not exceed 100 and 0 < R1, R2 ≤ 100.

Output

For each test case, output the volume of space where the electrons may occur, accurated to the nearest 0.01.

Sample Input

3
0 0 0 1 0 0 2 1
0 0 0 2 0 0 2 2
0 0 0 2 0 0 2 1
Sample Output

8.38
56.55
36.00

  • 写回答

1条回答 默认 最新

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

报告相同问题?

悬赏问题

  • ¥50 汇编语言除法溢出问题
  • ¥50 C++实现删除N个数据列表共有的元素
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗