comp.lang.ada
 help / color / mirror / Atom feed
From: Francesc Rocher <francesc.rocher@gmail.com>
Subject: Re: project euler 29
Date: Sun, 17 Sep 2023 11:56:30 -0700 (PDT)	[thread overview]
Message-ID: <715fe49a-47bc-46be-ae26-9ed89b38bcb5n@googlegroups.com> (raw)
In-Reply-To: <87jzsplr49.fsf@bsb.me.uk>

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/p0029_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

  reply	other threads:[~2023-09-17 18:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15  9:03 project euler 29 CSYH (QAQ)
2023-09-15  9:50 ` Jeffrey R.Carter
2023-09-15 18:04   ` Keith Thompson
2023-09-15 15:42 ` Ben Bacarisse
2023-09-16 10:07   ` Francesc Rocher
2023-09-16 20:59     ` Ben Bacarisse
2023-09-16 21:56       ` Ben Bacarisse
2023-09-17 18:56         ` Francesc Rocher [this message]
2023-09-17 22:54           ` Paul Rubin
2023-09-17 23:08           ` Ben Bacarisse
2023-09-18  0:09             ` Paul Rubin
2023-09-18  0:16               ` Ben Bacarisse
2023-09-18  5:16                 ` Paul Rubin
2023-09-18 11:31                   ` Ben Bacarisse
2023-09-18 13:04                     ` Francesc Rocher
2023-09-18 14:20                       ` Ben Bacarisse
2023-09-18 16:55                         ` Francesc Rocher
2023-09-18 19:22                           ` Ben Bacarisse
2023-09-18 19:38                             ` Paul Rubin
2023-09-18 19:52                               ` comp.lang.ada
2023-09-18 19:56                                 ` comp.lang.ada
2023-09-18 20:01                               ` Ben Bacarisse
2023-09-15 16:34 ` Jeffrey R.Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox