No: 16 November 04, 20
Prisms in a CubeWe 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的锥形体,有多少个锥形体(包括最小的和最大的)? 立方体 prisms 棱柱(体) 唉,这道题用程序穷举解太容易了
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 第二问呢? 只有1个问题,答案就是1000
页:
[1]