LearningGp / github-pages-comments

github-pages-comments
0 stars 0 forks source link

面试题64 求1+2+...+n | LearningGp #16

Open LearningGp opened 4 years ago

LearningGp commented 4 years ago

https://arvinhe.club/2020/06/02/%E9%9D%A2%E8%AF%95%E9%A2%9864-%E6%B1%821-2-n/#more

面试题64 求1+2+…+n难度:中等 平台:leetcode Description求 1+2+…+n ,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 示例 1: 输入: n = 3输出: 6示例 2: 输入: n = 9输出: 45 限制: 1 <= n <= 10000 https://leetcode-cn

LearningGp commented 4 years ago

面试题64 求1+2+...+n