【发布时间】:2022-01-03 05:51:05
【问题描述】:
我该如何解决这个问题? 像这样: 6041 6:666666 0: 4:4444 1:1 我只知道为了分隔数字,我们应该这样做,我认为:
num = int(input)
while num > 0:
res = num // 10
num = num % 10
【问题讨论】:
-
很酷,但你的问题是什么?
-
啊抱歉,这个程序怎么写?你能帮帮我吗?
-
嗯,你的第一个 sn-p 还不错(调整缩进)。现在只剩下通过复制输出数字(res)了。
标签: python algorithm python-2.7 for-loop while-loop