###### tags: `CPE-數學計算` # *Square Numbers* ## 題目:  ``` #include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; int main(void) { int a,b; while(cin>>a>>b){ int count =0; int temp; if (a==0&&b==0){ break; } for (int i=a;i<=b;i++){ temp = (int)sqrt(i); if (temp*temp==i){ count++; } } cout<<count<<endl; } return 0; } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up