3 ms·
This probably wouldn't be a very good optimization puzzle as the cost of printing would so dominate the arithmetic operations. :(
by ghettoimp 9y ago
This probably wouldn't be a very good optimization puzzle as the cost of printing would so dominate the arithmetic operations. :(
- raphlinus 9y agoThis is true, and I've thought about it a bit. If you were really optimizing, then maybe the goal would be stated as putting the completed answer into a memory buffer. But for now, shave as many nanoseconds as you can from the logic and pretend we don't have to worry about printing.