Deutsch English Français Italiano |
<usifaf$2g6s6$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: DFS <nospam@dfs.com> Newsgroups: comp.os.linux.advocacy Subject: Re: Project Euclid Problem 26 SOLVED!!! Date: Sat, 9 Mar 2024 15:03:27 -0500 Organization: A noiseless patient Spider Lines: 51 Message-ID: <usifaf$2g6s6$1@dont-email.me> References: <17bb1baebce14546$13883$3298354$802601b3@news.usenetexpress.com> <usidqe$15gr6$2@solani.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 9 Mar 2024 20:03:27 -0000 (UTC) Injection-Info: dont-email.me; posting-host="bd0cd99499b1364606b6e597c9f2633e"; logging-data="2628486"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZXKqZCEpLf9OsP2H00QKW" User-Agent: Betterbird (Windows) Cancel-Lock: sha1:O7YY6BLgsx2hMIDZnxvm6ZI72hs= In-Reply-To: <usidqe$15gr6$2@solani.org> Content-Language: en-US Bytes: 2644 On 3/9/2024 2:37 PM, Physfitfreak wrote: > On 3/9/2024 7:28 AM, Farley Flud wrote: >> Project Euclid Problem is SOLVED!!! >> >> https://projecteuler.net/problem=26 >> >> Using the fantastically potent FOSS CAS Maxima/wxMaxima the solution >> is a fucking snap: >> >> max:1$ >> maxd:3$ >> for num:3 thru 1000 step 1 do ( >> d:1, >> fact_list:ifactors(num), >> for i:1 thru length(fact_list) do ( >> if not(fact_list[i][1] = 2 or fact_list[i][1] = 5) then >> d:d*fact_list[i][1]^fact_list[i][2] >> ), >> if not(d = 1) then ( >> rep:zn_order(10,d), print("denom = ", num, "repeats = ", rep), >> if (rep > max) then (max:rep, maxd:num) >> ) >> else (print("denom = ", num, "terminating")) >> ); >> print("Max rep =", max, "at denom =", maxd); >> >> >> The output is not ideal, but hey, I am a fucking messy eater. >> I spill my coffee. I slobber all over my shirt. But I ALWAYS >> get the correct answer in the most efficient way and that's >> ALL that matters. >> >> Hail Linux! >> >> Hail GNU, FOSS, and the FSF! >> >> Hail Stallman! >> > > I don't understand. You say it's solved. So what did your code find? > Which denominator under 1000 gives the longest repeating decimals if > numerator is 1? So as not to ruin it for those trying it in the future, you don't publish the solutions to ProjectEuler problems. You submit your solution to the website and it says if you're right or not. Feeb's a prick, though, and published the code.