题解 | 小红的正整数计数
小红的正整数计数
https://www.nowcoder.com/practice/bf1c0694fdb84d12bc03793dee837117
#include <stdio.h>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) { // 注意 while 处理多个 case
// 64 位输出请用 printf("%lld") to
int count=0;
for(int i=a;i<=b;i++)
{
if(i%2==0)
count++;
}
printf("%d\n", count);
}
return 0;
}

