摘要:
1 package first_1; 2 3 public class primeNumberTest2 { 4 public static void main(String[] args) { 5 6 7 int count = 0; 8 label:for (int i = 2; i < 100 阅读全文
摘要:
1 /* 2 求质数的优化方案 3 */ 4 package first_1; 5 6 public class primeNumberTest1 { 7 public static void main(String[] args) { 8 9 boolean isFlag = true;//标识i 阅读全文
摘要:
1 l1 = [1, 2, 3, 4, 2, 2, 3, 4, 55, 66] 2 l2 = list() 3 # 取出l1的元素 4 for i in l1: 5 # 判断取出的元素是否在l2 6 if i not in l2: 7 # 不在的话追加进l2 8 l2.append(i) 9 pri 阅读全文
摘要:
1 l1 = [1, 2, 3, 4, 2, 2, 3, 4, 55, 66] 2 l2 = list() 3 # [元素,‘次数’,元素,‘次数’。。。] 4 for i in l1: 5 if i not in l2: 6 #不存在就把元素和1放进去 7 l2.append(i) 8 l2.ap 阅读全文