|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
同志,好像这72个数中有8个数是重复的:
4730
5134
4828
4724
4720
4742
4760
4754
是不是只要考虑其它的64个数?!
Comrade, it seems that among these 72 numbers, 8 numbers are repeated:
4730
5134
4828
4724
4720
4742
4760
4754
Do we only need to consider the other 64 numbers?!
|
|
2007-3-3 06:50 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
不是这样的,例如:4078+4078+4078+4052+4650=20936
如果test.txt中有3个4078的话,允许上式出现。
It's not like that. For example: 4078 + 4078 + 4078 + 4052 + 4650 = 20936. If there are 3 4078s in test.txt, the above formula is allowed to appear.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2007-3-3 06:54 |
|
|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
这样就更加加大了难度!
如果只考虑64个不重复的数的话,根据推算,至少需要35个数,至多37个数
This further increases the difficulty!
If only considering 64 non - repeating numbers, according to the calculation, at least 35 numbers are needed, and at most 37 numbers
|
|
2007-3-3 07:01 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
这是实际应用中的必然情况,也就是说,如果代码不运算重复数的话,只是练一练大家的手,而非解决我的难题了,请谅解。
This is an inevitable situation in practical applications. That is to say, if the code doesn't calculate the repeated numbers, it's just to practice everyone's hands, not to solve my problem. Please understand.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2007-3-3 07:05 |
|
|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
其实,将组合数字的数目排除在了35个到37个之间,如果按照常规的办法的话,组合的可能情况仍然是个极其庞大的数字。
In fact, excluding the number of combined numbers between 35 and 37, according to the conventional method, the possible number of combinations is still an extremely large number.
|
|
2007-3-3 07:16 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
好像很耗时间,嘻嘻,没测试
SETLOCAL ENABLEDELAYEDEXPANSION
for /f %%i in (data.txt) do (
set /a a1+=1
set _data!a1!=%%i)
for /l %%a in (1,3,%a1%) do (
set /a b=%%a+1
for /l %%b in (!b!,1,!b!) do (
set /a c=!b!+1
for /l %%c in (!c!,1,!c!) do (
set /a d=!c!+1
for /l %%d in (!d!,1,%a1%) do (
set /a z="1/(171780-!_data%%a!-!_data%%b!-!_data%%c!-!_data%%d!)"||echo !_data%%a!+!_data%%b!+!_data%%c!+!_data%%d!^=171780&&set /a _data%%a=0,_data%%b=0,_data%%c=0,_data%%d=0)
)
)
)
set
pause
Last edited by everest79 on 2007-3-2 at 06:33 PM ]
It seems to take a lot of time, hehe, not tested
SETLOCAL ENABLEDELAYEDEXPANSION
for /f %%i in (data.txt) do (
set /a a1+=1
set _data!a1!=%%i)
for /l %%a in (1,3,%a1%) do (
set /a b=%%a+1
for /l %%b in (!b!,1,!b!) do (
set /a c=!b!+1
for /l %%c in (!c!,1,!c!) do (
set /a d=!c!+1
for /l %%d in (!d!,1,%a1%) do (
set /a z="1/(171780-!_data%%a!-!_data%%b!-!_data%%c!-!_data%%d!)"||echo !_data%%a!+!_data%%b!+!_data%%c!+!_data%%d!^=171780&&set /a _data%%a=0,_data%%b=0,_data%%c=0,_data%%d=0)
)
)
)
set
pause
Last edited by everest79 on 2007-3-2 at 06:33 PM ]
|
|
2007-3-3 07:18 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
晕,原来是四位数,我看成五位数了
Oh, it turned out to be a four-digit number, I mistook it for a five-digit number
|
|
2007-3-3 07:39 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
|
2007-3-3 08:15 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
这么难的题目终于发出来了哦~我是想不出了,期待高手
Such a difficult question is finally posted. Oh~ I can't figure it out, looking forward to experts
|
|
2007-3-3 09:20 |
|
|
zhoushijay
高级用户
    Autowalk
积分 845
发帖 375
注册 2007-3-3
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
光是一道数学题目就可以杀死大片脑细胞了,更别说设计出一 套算法来-_-!
Just a single math problem can kill a lot of brain cells, let alone designing an algorithm. -_-!
|
|
2007-3-3 11:03 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
排序后:
3800
3858
4072
4162
4168
4188
4238
4240
4262
4270
4272
4322
4324
4498
4520
4616
4632
4682
4684
4704
4710
4712
4720
4720
4724
4724
4730
4730
4732
4742
4742
4744
4746
4754
4754
4760
4760
4762
4770
4776
4782
4784
4792
4808
4816
4824
4826
4828
4828
4830
4838
4896
4942
4948
5008
5076
5104
5130
5134
5134
5150
5164
5168
5174
5194
5206
5218
5224
5234
5266
5282
5348
最大的38位数之和
5348+5282+5266+5234+5224+5218+5206+5194+5174+5168+5164+5150+5134+5134+5130+5104+5076+5008+4948+4942+4896+4838+4830+4828+4828+4826+4824+4816+4808+4792+4784+4782+4776+4770+4762=175264
最小的39位数之和
3800+3858+4072+4162+4168+4188+4238+4240+4262+4270+4272+4322+4324+4498+4520+4616+4632+4682+4684+4704+4710+4712+4720+4720+4724+4724+4730+4730+4732+4742+4742+4744+4746+4754+4754+4760+4760+4762+4770=176548>171780
那么说明什么?只能是38位才可以。(随便算了下最小的38个加起来是171778)
这样位数就限定了!从2的72次方-1次运算减少到396561735952215036840次,约是344*2的60次方。。。虽然很大但是你要知道。。2的72次方是它的12!(≈11.9)的倍!
而且可以进一步减少次数。。。。
Sorted:
3800
3858
4072
4162
4168
4188
4238
4240
4262
4270
4272
4322
4324
4498
4520
4616
4632
4682
4684
4704
4710
4712
4720
4720
4724
4724
4730
4730
4732
4742
4742
4744
4746
4754
4754
4760
4760
4762
4770
4776
4782
4784
4792
4808
4816
4824
4826
4828
4828
4830
4838
4896
4942
4948
5008
5076
5104
5130
5134
5134
5150
5164
5168
5174
5194
5206
5218
5224
5234
5266
5282
5348
Sum of the largest 38 numbers
5348+5282+5266+5234+5224+5218+5206+5194+5174+5168+5164+5150+5134+5134+5130+5104+5076+5008+4948+4942+4896+4838+4830+4828+4828+4826+4824+4816+4808+4792+4784+4782+4776+4770+4762=175264
Sum of the smallest 39 numbers
3800+3858+4072+4162+4168+4188+4238+4240+4262+4270+4272+4322+4324+4498+4520+4616+4632+4682+4684+4704+4710+4712+4720+4720+4724+4724+4730+4730+4732+4742+4742+4744+4746+4754+4754+4760+4760+4762+4770=176548>171780
Then what does this indicate? It can only be 38 digits. (I casually calculated that the sum of the smallest 38 is 171778)
Thus, the number of digits is limited! The number of operations is reduced from 2^72 - 1 to 396561735952215036840 times, which is approximately 344 * 2^60 times... Although it is very large, you should know that 2^72 is about 11.9 times of it!
And the number of operations can be further reduced...
|
|
2007-3-3 21:18 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
最小的38个数之和 和需要的数字差2 (171780-171778=2)
3800+3858+4072+4162+4168+4188+4238+4240+4262+4270+4272+4322+4324+4498+4520+4616+4632+4682+4684+4704+4710+4712+4720+4720+4724+4724+4730+4730+4732+4742+4742+4744+4746+4754+4754+4760+4760+4762
而第39个数字是4770,和他最接近的数是第38个(我按顺序排的)。而这个数字4762
和4770的差大于2。
也就是说如果把39替换了38那么数字变大了6(171786)。
而这个数字是38个数字第2小的数。以后的数字都大于它!
所以最终的答案出来了!!!!!
无符合要求组合
The sum of the smallest 38 numbers has a difference of 2 from the required number (171780 - 171778 = 2)
3800 + 3858 + 4072 + 4162 + 4168 + 4188 + 4238 + 4240 + 4262 + 4270 + 4272 + 4322 + 4324 + 4498 + 4520 + 4616 + 4632 + 4682 + 4684 + 4704 + 4710 + 4712 + 4720 + 4720 + 4724 + 4724 + 4730 + 4730 + 4732 + 4742 + 4742 + 4744 + 4746 + 4754 + 4754 + 4760 + 4760 + 4762
And the 39th number is 4770. The number closest to it is the 38th one (I sorted them in order). And this number 4762 has a difference from 4770 that is greater than 2.
That is to say, if 39 is replaced with 38, the number becomes larger by 6 (171786). And this number is the 2nd smallest number among the 38 numbers. All the subsequent numbers are larger than it!
So the final answer comes out!!!!!
No qualifying combination
|
|
2007-3-3 21:28 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
re slore
不会如兄所说没有符合要求组合,因为我是经过一番挑选后求得这一结果,然后出的题目。
re slore
There won't be no qualifying combinations as you said, because I got this result after a selection and then made the question.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2007-3-3 21:49 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
Originally posted by ccwan at 2007-3-3 08:49:
re slore
不会如兄所说没有符合要求组合,因为我是经过一番挑选后求得这一结果,然后出的题目。
那你的数字是38个么?
你发短消息给我你的那个数字吧。
我觉得分析的没有错误啊。。。不会是计算上的吧~
Originally posted by ccwan at 2007-3-3 08:49:
re slore
There won't be no combination that meets the requirements as I got this result after a selection, and then made the question.
Is your number 38?
Send me the short message with your number.
I think the analysis is not wrong... It won't be a calculation issue~
|
|
2007-3-3 21:53 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
抱歉,我是随意选中一些数,得出一个结果后就发出来的,没有记录是哪些数,但可以肯定是存在这种组合的。
若因为我的疏忽造成真的没有,兄可以自己定义一个值,只要可以完成就行。
Sorry,Irandomlyselectedsomenumbers,gotaresultandsentitout,withoutrecordingwhichnumberstheywere,buttheremustbesuchcombinations.
Ifduetomyoversighttherereallyaren'tany,youcandefineoneyourselfaslongasitworks.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2007-3-3 21:59 |
|