Alexey Kalmykov
3/2/2007 7:51:00 PM
>>> On Mar 2, 2:21 pm, "Kyle Schmitt" <kyleaschm...@gmail.com> wrote:
>>> Ummm..... funny.... I see 9 and 12 in the output when I ran this :)
>>
>> it is my fault, last second optimization is always wrong
>> (my lunch is too short and I can't use ruby in the office :( ),
>> best I can get if 58 chars:
>>
>> 1.upto(?d){|i,x|i%3<1&&x=:Fizz;puts i%5<1?"#{x}Buzz":x||i}
>>
>> hope it works OK :)
>>
>Nice work. I removed ,x from |i,x| on a whim and it still works - 57
>bytes! (you have to count file size which as an EOF char)
I think you don't have to. Otherwise you have to count hard disk drive
sector size (a file cannot have it's size < sector size, which is
usually 512 byte) :)