摘要: 3.1 简单模拟 【PAT B1001】 step = 0 #用于记录除法步数 n = int(input()) while n!=1: if(n%2 == 0): n = n/2else: n = (3*n+1)/2 step+=1 print(step) 【PAT B1032】 第四组超时! f 阅读全文
posted @ 2020-12-02 09:13 cola_cola 阅读(57) 评论(0) 推荐(0) 编辑