题解 | #奇偶统计#
奇偶统计
https://www.nowcoder.com/practice/04de8eb0ecab426fa6be3ae99af17210
n=int(input()) a=[] b=[] for i in range(1,n+1): if i%2==0: a.append(i) else: b.append(i) print(len(b),len(a),end=" ")
奇偶统计
https://www.nowcoder.com/practice/04de8eb0ecab426fa6be3ae99af17210
n=int(input()) a=[] b=[] for i in range(1,n+1): if i%2==0: a.append(i) else: b.append(i) print(len(b),len(a),end=" ")
相关推荐