摘要:
Python: #计算并输出1~100之间的奇数之和与偶数之和 from functools import reduce print("evenSum=",end='') print(reduce(lambda a, b: a + b, filter(lambda i: i%2 == 0, [i f 阅读全文
摘要:
1. #快速生成1,2,3,..., 100数字列表: print([i for i in range(1,101)]) 2. #快速生成001,002,003,...,100数字列表: print([f"{i:03}" for i in range(1,101)]) 或者不用f-string pr 阅读全文
摘要:
Java import java.util.Scanner; public class compare { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print 阅读全文