| No: 01 July 14, 2010 |
Equilateral Triangles ![]() You are using a drawing program on a computer. You place several equilateral triangles of the same size on the screen. You observe that you can cover any of these triangles by moving the other triangles without rotating. What is the minimum number of triangles you have to place on the screen to ensure that this observation holds true for every case? [ You can answer this problem starting from Thursday at 11:00 (GMT) ] today's bonus: -- points answers: # 0 popularity: 75.0 % difficulty: 75.0 % |

| No: 04 August 04, 2010 |
Impossible Square Sum ![]() What is the largest number that cannot be expressed as a sum of different square numbers? [ You can answer this problem starting from Thursday at 11:00 (GMT) ] today's bonus: -- points answers: # 0 popularity: 31.3 % difficulty: 31.3 % |

原帖由 〇〇 于 10-8-6 13:30 发表
http://baike.baidu.com/view/942218.htm
四平方和定理说明所有正整数均可表示为最多四个平方数的和。但不是"不同"的平方数的和

原帖由 newkid 于 10-8-6 23:08 发表
这是哪里口音?我知道粤语的 咩=什么
OO贴的链接里面有一个:
连续整数的和
平方数还可以表示成 n^2 = 1 + 1 + 2 + 2 + ... + n − 1 + n − 1 + n。例如,4^2 = 16 = 1 + 1 + 2 + 2 + 3 + 3 + 4。可以将其解释为在边长为 3 的矩形上添加宽度为 1 的一行和一列,即得到边长为 4 的矩形。这对于计算较大的数的平方数非常有用。例如, 52^2 = 50^2 + 50 + 51 + 51 + 52 = 2500 + 204 = 2704
似乎能用上,但我想了半天也没出来......

原帖由 〇〇 于 10-8-15 16:11 发表
野花128的证明,那些人都是数学精
http://bbs.emath.ac.cn/viewthrea ... p;extra=&page=1
673.81 KB, 下载次数: 45


原帖由 newkid 于 2010-8-26 23:16 发表
第7题:
Neighboring Digits
We have a number. All the digits of this number are different from one another and all the digits except the first and the last have a greater value than the mean of its neighbors (ie. the digits immediately to the left and to the right).
What can this number be at maximum?
有一个数,它的每一位都不相同。除了首位和末尾,其他的每一位都比它的左右邻居(左边一位数和右边一位数)的平均值更大。这个数最大可能是多少?
递归WITH:
WITH t(str) AS (
SELECT TO_CHAR(ROWNUM) FROM DUAL CONNECT BY ROWNUM
原帖由 szusunny 于 10-8-27 09:29 发表
with tmp1 as(select rownum-1 as p from dual connect by rownum <= 10),
tmp2 as (select a.p as x, b.p as y from tmp1 a, tmp1 b where a.p <> b.p)
--
select
max(to_number(replace(sys_connect_by_path(x,','),',') || y)) as res
from tmp2
connect by level <= 10
and prior x + y < (prior y)*2
and prior x <> y
and prior y = x

原帖由 szusunny 于 2010-8-27 09:29 发表
with tmp1 as(select rownum-1 as p from dual connect by rownum <= 10),
tmp2 as (select a.p as x, b.p as y from tmp1 a, tmp1 b where a.p <> b.p)
--
select
max(to_number(replace(sys_connect_by_path(x,','),',') || y)) as res
from tmp2
connect by level <= 10
and prior x + y < (prior y)*2
and prior x <> y
and prior y = x
-- Result
RES
1 3689740
原帖由 newkid 于 10-9-1 21:51 发表
#8:
Generating Numbers
Applying the steps below, you will generate a number, on the condition that every digit of a number produced in each step is different from its other digits.
1. Write down a number with one, two or three digits.
2. Delete at most three consecutive digits and in the places of the deleted digits place the square of the number formed by these digits.
3. For the number you get, repeat steps two and three. If you cannot get a number that satisfies the conditions, stop.
What is the largest number that can be generated through this mechanism?
Example: 307, 3(07), 349, 3(4)9, 3169, ...
原帖由 lastwinner 于 2010-9-2 16:54 发表
赞![]()
ps:三位数里有满足题设条件的
with p as (select rownum-1 rn from dual connect by rownum<=10),
three_digits as (select replace(sys_connect_by_path(rn,','),',','') num from p where level=3 start with rn>0 connect by nocycle rn<>prior rn and level<=3)
select num, numnum from
(select num, power(num,2) numnum from three_digits)
where length(numnum)=11-length(translate('0123456789',numnum,'$'))
/

原帖由 szusunny 于 10-9-3 10:16 发表
38(7),38(49),(3)82401,98(24)01,98(5)7601,98(2)57601,98457(6)01,984573601
这个答案为什么不继续向前推呢?
38(7),38(49),(3)82401,98(24)01,98(5)7601,98(2)57601,98457(6)01,984(5)73601,9842573601

原帖由 szusunny 于 2010-9-3 10:46 发表
不继续向前推的原因是判断字符不重复方法length(num)=10-length(translate('0123456789','$'||num,'$'))的漏洞.
应该加上nvl(...)解决NULL问题.
nvl(length(num),0)=10-nvl(length(translate('0123456789','$'||num,'$')),0)
原帖由 haiersknl 于 2010-9-3 15:11 发表
1 5 9 13 17 2 6 10 14 18 3 7 11 15 19 4 8 12 16
请你继续算第8题,上面有人算出984573601,有人指出应该继续运行得出9842573601。
那么现在的问题就出来了,程序上的漏洞会不会,让我们怀疑这个结果:9842573601 很可能不是最优的。
你们之前算的552是对的。552你们编程加调试一共用了多久?我有个简单方法笔算可搞定。
| 欢迎光临 ITPUB论坛-专业的IT技术社区 (http://www.itpub.net/) | Powered by Discuz! X3.2 |