链接
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2456
题解
这不就是 ( ⌊ b ⌋ − ⌊ a − 1 ⌋ ) (\lfloor\sqrt b\rfloor - \lfloor\sqrt {a-1}\rfloor) (⌊b⌋−⌊a−1⌋)Problem吗
代码
//水题
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
while(scanf("%d%d",&a,&b),a)printf("%d\n",(int)sqrt(b)-(int)sqrt(a-1));
return 0;
}