计算并输出s=1+2^2+3^3+4^4+…+9^9,要求用循环实现
收起
s = 0 for i in range(1, 10): value = i ** i s += value # 累加到总和中 print("s =", s)
报告相同问题?