Re: find a number
- From: Sc0rpi0 <sc0rpi0@xxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 15:25:07 +0200
s = 0; i = 0;
s -= i;
s += a[i++];
} while (i <= 1001);
s = 0; i = 1(0);
while (i<1002(1001)) s+=a[i++];
s-=500500; (or (1000+1)*1000/2 - Gauss ;P, but precalculated is better)
printf("duplicate is %d\n", s);
I hated going to weddings.
All the grandmas would poke me saying "You're next".
They stopped that when I started doing it to them at funerals.
- Prev by Date: Re: String concatenation design
- Next by Date: Re: find a number
- Previous by thread: Re: find a number
- Next by thread: Re: find a number