题目: 求1+2+3+…+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 Python代码 def sum(n): count = n num = n and sum(n - 1) # python里: A and B, A为真返回B,A为假返回A return count + num print(sum(100)) # 5050