Nп/п : 7 из 100
 От   : Francesc Rocher                     2:5075/128        17 сен 23 11:56:30
 К    : Ben Bacarisse                                         17 сен 23 21:59:03
 Тема : Re: project euler 29
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
<715fe49a-47bc-46be-ae26-9ed89b38bcb5n@googlegroups.com> 6604d745
@REPLY: <87jzsplr49.fsf@bsb.me.uk> 640bd345
@REPLYADDR Francesc Rocher
<francesc.rocher@gmail.com>
@REPLYTO 2:5075/128 Francesc Rocher
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<beaa0494-5783-4130-b96f-1a5271466678n@googlegroups.com> <874jjvmoi9.fsf@bsb.me.uk>
<a10a258f-8a3a-4017-bb30-8fe5629089ffn@googlegroups.com> <87sf7dltq0.fsf@bsb.me.uk> <87jzsplr49.fsf@bsb.me.uk>
@RFC-Message-ID:
<715fe49a-47bc-46be-ae26-9ed89b38bcb5n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
 El dia dissabte, 16 de setembre de 2023 a les 23:56:11 UTC+2, Ben
Bacarisse va escriure:
> Ben Bacarisse <ben.u...@bsb.me.uk> writes: 

> > Francesc Rocher <frances...@gmail.com> writes: 
> > 
 > >> El dia divendres, 15 de setembre de 2023 a les 17:42:43
UTC+2, Ben Bacarisse va escriure: 
> >>> "CSYH (QAQ)" <sche...@asu.edu> writes: 
> >>> 
> >>> > Now this time, I am facing trouble for problem #29. As I know integer 
> >>> > type is for 32 bits. but for this problem as me to find out the 2 ** 
> >>> > 100 and even 100 ** 100. I used python to get the answer correctly in 
> >>> > 5 minutes. 
> >> 
> >>> Most of the Project Euler problems have solutions that are not always 
> >>> the obvious one (though sometimes the obvious one is the best). You 
> >>> can, of course, just use a big number type (or write your own!) but this 
> >>> problem can be solved without having to use any large numbers at all. 
> >> 
> >> Please take a look at this solution: 
https://github.com/rocher/alice-project_euler-rocher/blob/main/src/0001-0100/p00
29_distinct_powers.adb 
> > 
> > Why?
> That came over as rather curt. I meant what is it about the code that 
> you are drawing my attention to -- its particular use of Ada, its 
> structure, the algorithm, the performance...? What (and where) is 
> Euler_Tools? 

Well, I was sending the answer to the thread, not to anyone in particular.

 I simply thought that, since you mention that this can be solved
without having to use
 big numbers, people in this group could be interested in seeing
how. My solution to this
 problem dates back to earlier this year, when I solved the first
30 problems of Project
Euler.

 Euler_Tools is a repository of functions that I`m collecting while
solving new problems
  of Project Euler. In case you want to take a look,
https://github.com/rocher/euler_tools 

Also, do you have a different approach to solve this 29th problem?

BR
---
Francesc Rocher
--- G2/1.0
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх