Re: How to Make Cisterns

Liste des GroupesRevenir à r puzzles 
Sujet : Re: How to Make Cisterns
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : rec.puzzles
Date : 03. May 2025, 15:26:52
Autres entêtes
Organisation : Fix this later
Message-ID : <vv593c$3n6ot$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 03/05/2025 14:52, Richard Tobin wrote:
In article <vv55q1$3jq94$1@dont-email.me>,
Richard Heathfield  <rjh@cpax.org.uk> wrote:
 
int main(void)
{
   int i;
   int ms = 0;
   int mv = 0;
   for(i = 0; i < 1000000; i++)
   {
     int s = 1000000 - i;
     int v = s * s * s;
 Oh no it isn't.  The cistern is not a cube.
Bugger 1.

 I'm not sure which side your s is.  If s is the side of the cistern,
then the height h is (1000000-s)/2, and v = s * s * h.  If s is the
side of the cut-off square, then the base b is (1000000-2*s) and
v = b * b * s.
 And of course the calculation overflows 32-bit ints.
Bugger 2!
Redoubled in buggers. I quit!
(For a few moments, at least.)
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

Date Sujet#  Auteur
3 May 25 * How to Make Cisterns18David Entwistle
3 May 25 +* Re: How to Make Cisterns9Richard Heathfield
3 May 25 i+* Re: How to Make Cisterns7David Entwistle
3 May 25 ii`* Re: How to Make Cisterns6Richard Heathfield
3 May 25 ii `* Re: How to Make Cisterns5Richard Tobin
3 May 25 ii  `* Re: How to Make Cisterns4Richard Heathfield
3 May 25 ii   `* Re: How to Make Cisterns3Richard Heathfield
3 May 25 ii    +- Re: How to Make Cisterns1David Entwistle
3 May 25 ii    `- Re: How to Make Cisterns1Richard Tobin
3 May 25 i`- Re: How to Make Cisterns1Richard Tobin
3 May 25 +- Re: How to Make Cisterns1Richard Tobin
3 May 25 +- Re: How to Make Cisterns1Richard Tobin
4 May 25 +- Re: How to Make Cisterns1Richard Tobin
4 May 25 +- Re: How to Make Cisterns1David Entwistle
4 May 25 +- Re: How to Make Cisterns1Carl G.
7 May 25 `* Re: How to Make Cisterns3David Entwistle
7 May 25  `* Re: How to Make Cisterns2David Entwistle
9 May 25   `- Re: How to Make Cisterns1Mark Brader

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal