Felix Geerinckx wrote at Thu, 30 May 2002 14:41:45 +0200: > on Thu, 30 May 2002 13:06:04 GMT, [EMAIL PROTECTED] (Janek Schleicher) wrote: > >> Sorry, but 3 to 10 are 3,4,5,6,7,8,9,10 = 8 times >> and 15 to 20 are 15,16,17,18,19,20 = 6 times. >> So the answer should be 8+6 = 14, shouldn't ? > > I don't think so: > > "Lunch from 1 to 2 pm" means one hour lunch, not two ;-) Yep, quite 13 can't be right.
Let's change my algorithm from: my %timings; $timings{$_}++ for (3 .. 5, 4 .. 10, 15 .. 20); my $total_time = scalar values %timings; to: my %timings; $timings{$_}++ for (4 .. 5, 5 .. 10, 16 .. 20); my $total_time = scalar values %timings; (The scalar statement is in fact not really needed, but I find it more readable so :-)) Done. Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]