2011年4月8日 星期五

[Project Euler]Problem 1 - Add all the natural numbers below one thousand that are multiples of 3 or 5.

將小於1000的3的倍數與小於1000的5的倍數全部加起來,
接著再扣掉全部小於1000的15的倍數即可得解。

[Ruby]

沒有留言:

張貼留言