raa 发表于 2009-11-7 11:53:36

No: 16 November 04, 20

Prisms in a Cube


We have a 4x4x4 cube consisting of 64 unit cubes. How many rectangular prisms can be counted in this cube?

Note: Rectangular prisms of every size, including the cubes (and the 4x4x4 cube itself) will be considered.
引申:边长为4x4x4的锥形体,有多少个锥形体(包括最小的和最大的)?

〇〇 发表于 2009-11-7 12:28:52

立方体

〇〇 发表于 2009-11-7 12:31:25

prisms 棱柱(体)

〇〇 发表于 2009-11-7 13:30:10

唉,这道题用程序穷举解太容易了
with t1 as(select level x from dual connect by level<=3)
select l.x,t.x,r.x,b.x,(r.x-l.x)*(b.x-t.x)*(z1.x-z0.x)v from t1 l,t1 r,t1 t,t1 b,t1 z0,t1 z1
where r.x>l.x and b.x>t.x and z1.x>z0.x
order by v,l.x;
1 =1
2 =27
3 =216
4 =1000

raa 发表于 2009-11-7 14:13:59

第二问呢?

〇〇 发表于 2009-11-7 21:25:26

只有1个问题,答案就是1000
页: [1]
查看完整版本: No: 16 November 04, 20