题解 | 奇偶统计
奇偶统计
https://www.nowcoder.com/practice/04de8eb0ecab426fa6be3ae99af17210
n = int(input())
count1 = 0
count2 = 0
for i in range(1, n + 1):
if i % 2 == 0:
count2 += 1
elif i % 2 != 0:
count1 += 1
print(count1, count2)
奇偶统计
https://www.nowcoder.com/practice/04de8eb0ecab426fa6be3ae99af17210
n = int(input())
count1 = 0
count2 = 0
for i in range(1, n + 1):
if i % 2 == 0:
count2 += 1
elif i % 2 != 0:
count1 += 1
print(count1, count2)
相关推荐
LZStarV:冲就好了,就算真的是字节也冲,面评脏了大不了等三四个月就淡了,而且等到那个时候实力进步了选择还多,何必拘泥于字节