05 2024 档案
摘要:year = int(input("Please input the year:"))if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0): print("这是闰年")else: print("这不是闰年")
阅读全文
摘要:book = [1, 2, 3, 4, 5]count = 0for a in book: for b in book: if a != b: for c in book: if c != a and c != b: count += 1 print("第%d种:A借书%d,B借书%d,C借书%d"
阅读全文
摘要:if __name__ == '__main__': Li = [0, 1] for a in Li: for b in Li: for c in Li: zhang = (b == 0) li = (c == 0) wang = (a+b == 0) if (zhang+li+wang == 2
阅读全文
摘要:for i in range(1, 1000): ge = i % 10 bai = i // 100 shi = i // 10 % 10 if i == ge**3+shi**3+bai**3: print(i, "是水仙花") else: print(i, "不是水仙花")
阅读全文
摘要:lower = int(input("please input the lower number:")) higher = int(input("please input the higher number:")) for i in range(lower, higher+1): s = 0 for
阅读全文