Nп/п : 12 из 100
 От   : Paul Rubin                          2:5075/128        17 сен 23 22:16:33
 К    : Ben Bacarisse                                         17 сен 23 08:21:03
 Тема : Re: project euler 29
----------------------------------------------------------------------------------
                                                                                 
@MSGID: <87v8c8oyby.fsf@nightsong.com> a40ba409
@REPLY: <8734zcl4j0.fsf@bsb.me.uk> d5c039f3
@REPLYADDR Paul Rubin <no.email@nospam.invalid>
@REPLYTO 2:5075/128 Paul Rubin
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: <87v8c8oyby.fsf@nightsong.com>
<beaa0494-5783-4130-b96f-1a5271466678n@googlegroups.com><874jjvmoi9.fsf@bsb.me.u
k><a10a258f-8a3a-4017-bb30-8fe5629089ffn@googlegroups.com><87sf7dltq0.fsf@bsb.me
.uk><87jzsplr49.fsf@bsb.me.uk><715fe49a-47bc-46be-ae26-9ed89b38bcb5n@googlegroups.co
m><87ediwl7oq.fsf@bsb.me.uk> <87zg1kpcjh.fsf@nightsong.com><8734zcl4j0.fsf@bsb.me.uk>
@TZUTC: -0700
@PID: Gnus/5.13 (Gnus v5.13) Emacs/27.1
(gnu/linux)
@TID: FIDOGATE-5.12-ge4e8b94
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>> So you just loop through 1 <= a,b <= 100 and count only the a,b pairs
>> where a is the smallest a for its equivalence class.
> This is likely to be fast which is why I wanted to compile Francesc`s to
> try it out.  Mind you, a naive a^b == c^d test gives pretty good
> performance for the kind of range requested.

But Francesc`s program doesn`t use that method.  It only suggests it in
a comment.  The program actually works by building a list, sorting it,
and counting the groups.
--- Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 * Origin: A noiseless patient Spider (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    
                                                                                
В этой области больше нет сообщений.

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