#27546: CPP


qgd20040229@gmail.com (时年)

學校 : 不指定學校
編號 : 170559
來源 : [27.105.55.178]
最後登入時間 :
2021-10-10 23:00:28
d186. 11461 - Square Numbers -- UVa11461 | From: [27.105.55.178] | 發表日期 : 2021-10-10 23:53

#include <iostream>

#include <cmath>

using namespace std;

 

int main(){

  int a, b;

  while (cin >> a >> b){

    if (a == 0 && b == 0) break;

    cout << floor(sqrt(b))-ceil(sqrt(a))+1 <<endl;

  }

}

 
ZeroJudge Forum