> If that is too slow compared
> to using an array, then I must assume that you have so much data that
> doing whatever you're doing in another language would be preferable.
Stdin can have an unlimited amount of data. This approach time
complexity is not linear with respect to the input. That is what I
mean by too slow.
> Also, is the use of an additional array variable not wanted due to
> purely aesthetic reasons?
Yes. The name of the variable "a" is nonessential. It is mentioned
twice. From the succinct perspective of the language, if it can be
avoided, it would be best.
--
Regards,
Peng