回复:My bad! I didn't read your solution carefully.

来源: 2008-02-13 07:35:01 [旧帖] [给我悄悄话] 本文已被阅读:

Your logic thinking is great. Your solution is my first thought. However, if you like to find out the best algorithm, calculation is cheaper than logic comparison.