3174
月份和天等于年份后三位或后两位的平方根,这样的一天定义为Square Root Day
给出起始年份和终止年份,求符合的有多少个。
呵呵哒,总是有错误在傻傻的地方,简直想哭。一定要仔细仔细~~~傻女孩,你可以的。
3174
#include<iostream>
using namespace std;
int main(){
int T;
int begin ,end ;
int s;
int y,d;
int three,two;
cin>>T;
while(T--){
cin>>begin >>end ;
s=0;
for(y=begin ;y<=end ;y++){
three=y%1000;
two=three%100;
for( d=1;d<=12;d++ ){
if( d*d==three || d*d==two ) s++;
}
}
cout<<s<<endl;
}
return 0;
}