From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,24ac4e1c8cbfe3c X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Sums of cubes (was Re: histrionics) Date: 1999/09/24 Message-ID: <37EC14A2.2289AAEB@mitre.org>#1/1 X-Deja-AN: 529253454 Content-Transfer-Encoding: 7bit References: <37D670CE.855F96BD@interact.net.au> <37D678E4.9867000B@interact.net.au> <37d74de9@eeyore.callnetuk.com> <7r8c60$b2q$1@nnrp1.deja.com> <7r9rkj$g75$1@nnrp1.deja.com> <7rcddd$bfd$1@nnrp1.deja.com> <37DECE9D.72D1E87E@mitre.org> <37EA8DEA.61D49E6A@mitre.org> <37EB958C.26DB4C97@ftw.rsc.raytheon.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 938218371 27819 129.83.41.77 (25 Sep 1999 00:12:51 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 25 Sep 1999 00:12:51 GMT Newsgroups: comp.lang.ada Date: 1999-09-25T00:12:51+00:00 List-Id: Wes Groleau wrote: > when Constraint_Error => > null; -- If the sum gets a constraint error > -- and the number didn't, it's not a match. > -- In a block because we don't want an > -- error on 9,999 to prevent checking 10,000 > -- (I think Robert missed this detail.) Nope, the sum of cubes of 999 is 3*729 = 2187, the sum of cubes for 9999 is 2916, etc. If you were going for something like the tenth power it would be an issue. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...