摘要: import math n = int(input('Input an integer:')) m = int(math.sqrt(n) + 1) for i in range(2, m): if n % i == 0: print('No') break else: print('Yes') #输 阅读全文
posted @ 2018-02-24 21:11 守护窗明守护爱 阅读(324) 评论(0) 推荐(0) 编辑
摘要: for i in range(100, 1000): ge = i % 10 shi = i // 10 % 10 bai = i // 100 if ge ** 3 + shi ** 3 + bai ** 3 == i: print(i, end=' ') #输出结果 #153 370 371 407 阅读全文
posted @ 2018-02-24 21:05 守护窗明守护爱 阅读(393) 评论(0) 推荐(0) 编辑
摘要: import time date = time.localtime() print(date) #time.struct_time(tm_year=2018, tm_mon=2, tm_mday=24, tm_hour=19, tm_min=42, tm_sec=57, tm_wday=5, tm_yday=55, tm_isdst=0) year = date[0] month = dat... 阅读全文
posted @ 2018-02-24 19:44 守护窗明守护爱 阅读(1333) 评论(0) 推荐(0) 编辑