Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00044834
Message ID:
00046251
Vues:
52
>>>> Where does 109 89 and 91 come from?
>>>
>>> Should have tested before, Matt is right.
>>>
>>> Say the solution is x, y and z,
>>>then x+y= z and 100x + 10y +10 z + 100 y + 10x + z = 100 z +10y + x
>>>
>>>I ran my solution but could not have any result. That is because there
>>>are so many other possibilities that I do not check. There goes my no
>>>nomination for thouroughness I guess.
>>>
>>It looked like a "diaphantine" equation. I tried to derive such myself, but quickly discovered that creating/solving a diaphantine was more difficult than just programming a little bit (s). BTW, I used 6 FOR loops to solve it...
>
>Hi Bruce,
> I used 4 FOR loops to solve it, but I cheated and permutated the 3 digits manually :-). Yours surely more elegant. Nice mental excercise, but I must say it would be nice to formulate a purely mathematical solution form maximum elegance and pure thinking :-).
>
Actually 6 for loops is kind of brutal, I think (s). I agree, a good math solution would be nicer...then you could expand it to any number of digits...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform