Online Judge - 11461 - Square Numbers
Online Judge - 11461 - Square Numbers
來源代碼:UVa
前往提交 ↓
A square number is an integer number whose square root is also an integer. For example 1, 4, 81 are some square numbers. Given two numbers a and b you will have to find out how many square numbers are there between a and b (inclusive).
輸入說明
The input file contains at most 201 lines of inputs. Each line contains two integers a and b
(0 < a ≤
b ≤ 100000)
Input is terminated by a line containing two zeroes. This line should not be processed.
輸出說明
For each line of input produce one line of output. This line contains an integer which denotes how many square numbers are there between a and b (inclusive).
輸入輸出範例
範例 1
範例輸入
1 4 1 10 0 0
範例輸出
2 3
範例 2
範例輸入
3 17 16 24 0 0
範例輸出
3 1
範例 3
範例輸入
25 25 26 35 99855 100000 0 0
範例輸出
1 0 1
討論
登入後即可加入討論。
登入
目前還沒有討論文章。
最近提交
目前還沒有提交紀錄。
登入後即可撰寫程式、測試範例及提交解答。
登入