摘要:
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 阅读全文
posted @ 2020-07-13 15:43
I_code_rookie
阅读(334)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2020-07-13 11:39
I_code_rookie
阅读(97)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2020-07-13 11:23
I_code_rookie
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号