#13098: TLE(killed) 跪求大大幫忙


joe631263126312 (unknown)


#include<iostream>
using namespace std;

int main()
{
int t;
cin>>t;
while(t=t)
{
    int a,b,t=0;//t=sum
    cin>>a>>b;
    for(int i=a;i<=b;i++)
    {
        for(int r=0;r<=b;r++)
        {
            if(r*r==i)
                t++;
        }
    }

cout<<t <<endl;

}

return 0;
}
#13102: Re:TLE(killed) 跪求大大幫忙


nkavengertree (LaG)


#include
using namespace std;

int main()
{
int t;
cin>>t;
while(t=t)
{
    int a,b,t=0;//t=sum
    cin>>a>>b;
    for(int i=a;i<=b;i++)
    {
        for(int r=0;r<=b;r++)
        {
            if(r*r==i)
                t++;
        }
    }

cout<endl;

}

return 0;
}

while( t = t )  ??????
你這邊想要表示的是什麼


如果是等於要用   ==