Sujet : Re: Prog Challenge
De : physfitfreak (at) *nospam* gmail.com (Physfitfreak)
Groupes : comp.os.linux.advocacyDate : 08. Mar 2024, 07:07:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <use6dl$1h55r$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 3/7/2024 9:25 PM, Physfitfreak wrote:
On 3/7/2024 12:11 PM, Nuxxie wrote:
Programming is about mathematics and not coding.
>
Problem:
>
Any rational number a/b (in lowest terms) can be expressed either
as a terminating decimal or a repeating decimal.
>
We consider here only repeating decimals.
>
Given, a and b, which are intergers with any number of digits,
find the repeating portion in the decimal expansion.
>
That is, the decimal expansion will be:
>
a1, a2, a3, ... an, [r1, r2, r3 ... rn]
>
where [... ri ...] is the repeating portion.
>
Example:
>
1/28 = 0.03 571428 571428...
>
The non-repeating, leading portion can be very long and so too can
the repeating portion.
>
I don't think the dorks here know such stuff. And the good ones believe it's waste of time but what they do (i.e. "fart") is not waste of time.
So I'll go ahead and ruin it for them all :)
(method of nines)
>
Forgot to add that I suggest that when you post a challenge question, you add sci.physics to target group as well. Reason for that is that This newsgroup is pretty obscure and buried inside load of shit in usenet. Sane healthy people who'd be interested in working on such problems find sci.physics much more easier and quicker than a strange named newsgroup like COLA. But unfortunately, so do the insane people :)
-- This email has been checked for viruses by Avast antivirus software.www.avast.com