标题: 儿子的在澳大利亚七年级班上的小组的PROBLEM SOLVING题目 [打印本页] 作者: shurman 时间: 2-8-2011 21:36 标题: 儿子的在澳大利亚七年级班上的小组的PROBLEM SOLVING题目 儿子的在澳大利亚七年级班上的小组的PROBLEM SOLVING题目
Consider the following sequence:
1,2,3,4,5,6,7,8,9,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,2,0,2,1,2,2,2,3,2,4,2,5,2,6,2,7,2,8,2,9,3,0,...
It is listing natural numers, but we consider it as a sequence of digits, that is, its elements are from the set {1,2,3,4,5,6,7,8,9,0}.
For example 9th element in the sequence is 9, 10th is 1, 11th is 0, 12th is 1, and so on.
a) Find the 365th element in the given sequence.
b) Find the 3650th element in the given sequence.
c) Find the number of 1s up to the 2000th element.
d) Find the position of 2000th occurrence of digit 1.
大家看看难度咋样?答案是啥?
[ 本帖最后由 shurman 于 2-8-2011 21:43 编辑 ]作者: yan1125 时间: 2-8-2011 21:39
晕了作者: Komodo 时间: 2-8-2011 21:41
还以为4选1呢,原来是4个questions,不会~奥术的样子,顶起~作者: shurman 时间: 2-8-2011 22:05 标题: 答案之一和二。 Assume N is the natural number,
when 1<=N<=9, the position of N is N itself.
when 9<N<=99, the position of N's last digit is 2(N-9)+9, The position of last digit of 99 is 2(99-9)+9 = 189.
when 99<N<=999, the position of N's last digit is 3(N-99)+189. The position of last digit of 999 is 3(999-99)+189 = 2889
when 999<N<=9999, the position of N's last digit is 4(N-999) + 2889. ......
Therefore:
Question 1) for the 365th element, we have 3(N-99)+189 =365 => N=157 rest 2
so the 365th element is the second digit of 158, the answer is 5.
Question 2) For the 3650th element we have 4(N-999) +2889 = 3650 => N=1189 rest 1
so the 3650th element is the frist digit of 1190, the answer is 1.
楼主,你这答案对吗?
when 9<N<=99, the position of N's last digit is 2(N-9)+9, The position of last digit of 99 is 2(99-9)+9 = 189; 按这个理论,至少数列中要出现10以上的数字啊,然而题目给出的自然数列只是1-9的重复啊~~~
我的想法:
规律:总体上,分段, 找位置与数字的关系
位置1-9,就是1-9数字本身;
位置10-29, 数字1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,8,1,9, 即从0-9的数列,但是中间间隔数字1,且从间隔数字起步
位置30-49, 数字2, ............, 从0-9数列,中间间隔数字2,且从间隔数字起步
所以设 间隔数字v, 位置p,v=p/20 取整, 如果问题是位置>9且偶数位上的数字,那答案就有了,就是间隔数字 v
而奇数位是自然序列1-9,设为n, 位置与数字关系是n=(p的个位)/2,即位置的个位除2取整的值,例数字0为位置11,则0=1/2
所以
1st Q, 365位=》位置>9且奇数位,数字应该是5/2=2;
2nd Q, 3650位=》位置>9且偶数位,算间隔数字,v=3650/20=182;
3rd Q,没看明白
4th Q, 29位之前,1的次数是1+1+1*10=12次,之后的规律,每20位出现1次,所以次数与间隔数字是有关系的,设t为总次数,t=v-1+12,而且我们可知值为1的位置与间隔数字关系,p=20*v-10+3,所以=》设出现2000次1的位置p,已知t=2000,则v=2000-12+1=1989,p=20*v-10+3=39773;