编程介的小学生 2017-05-28 07:13 采纳率: 20.5%
浏览 689
已采纳

Count the cuboids

Problem Description

Look up the picture A , the big wood is cut into many small ones. As we know, a cuboid has three attributes: Length, Width and Height. In the picture B, C, D, there are different. The problem is so easy that you just need to count the kinds of the cuboids which can be cut from the big one. When we cut the big one into so many small one, we give every one a number to mark which is 1×1×1. Look at the picture B and C, they have the same length, width and height, but the marking numbers they have are different from each other, so B is different from C. B and D have the different attributes (any one attribute of the length, width and height is different), so they are also different.

Input
Many data cases come. In each case, there are three positive integers L, W, H, which are the length, the width and the height of the LWH. When L, W and H are all -1, the input is over, and you haven’t to handle them.

Output
For each case, you should print the number of any kinds of cuboids you can cut from the original big one, and any two ones must be of difference. And you have to make sure the length and the width and the height of the small one you cut are all integers. You can assume the final result will be in the range of the 32-integer, for that you can calculate it easily.

Sample Input
5 3 4
2 2 2
1 1 2
-1 -1 -1

Sample Output
900
27
3

  • 写回答

1条回答 默认 最新

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

报告相同问题?

悬赏问题

  • ¥15 python:excel数据写入多个对应word文档
  • ¥60 全一数分解素因子和素数循环节位数
  • ¥15 ffmpeg如何安装到虚拟环境
  • ¥188 寻找能做王者评分提取的
  • ¥15 matlab用simulink求解一个二阶微分方程,要求截图
  • ¥30 乘子法解约束最优化问题的matlab代码文件,最好有matlab代码文件
  • ¥15 写论文,需要数据支撑
  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导
  • ¥15 docker模式webrtc-streamer 无法播放公网rtsp