题解 | #奇偶统计#

奇偶统计

http://www.nowcoder.com/practice/04de8eb0ecab426fa6be3ae99af17210

n =int(input())
ji = 0
ou = 0
for i in range(1,n+1):
    if i % 2 == 0:
        ou += 1
    else:
        ji += 1
print("%d %d" % (ji,ou))
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务