Square Numbers UVA - 11461(水题)

#include <iostream>
#include <cstdio>
#include <sstream>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <cmath>
#define MOD 2018
#define LL long long
#define ULL unsigned long long
#define Pair pair<int, int>
#define mem(a, b) memset(a, b, sizeof(a))
#define _  ios_base::sync_with_stdio(0),cin.tie(0)
//freopen("1.txt", "r", stdin);
using namespace std;
const int maxn = 10010, INF = 0x7fffffff;

int main()
{
    int a, b;
    while(cin>> a >> b && a + b)
    {
        int d = sqrt(b);
        int m = sqrt(a-1);
        cout<< d - m<<endl;

    }

    return 0;
}

 

posted @ 2018-07-17 09:52  WTSRUVF  阅读(133)  评论(0编辑  收藏  举报