python-3. The program count one extra value (cycle “while”)

后端 未结 0 1860
别那么骄傲
别那么骄傲 2021-02-02 05:48
N = int(input())

n = 1
 
k = 1

while n < N:

    n = k ** 2
    print(n)
    k = k + 1
相关标签:
回答
  • 消灭零回复
提交回复
热议问题