面试题64
求 1+2+...+n ,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。
限制:
1 <= n <= 10000
Solutions
Short-circuit operation
borrowed from others.
Last updated
Was this helpful?
求 1+2+...+n ,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。
1 <= n <= 10000
Short-circuit operation
borrowed from others.
Last updated
Was this helpful?