Help needed in EXAMCHT

https://www.codechef.com/viewsolution/29273057
please someone help. its giving WA.

#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define BIG(a,b) (a>b)?a:b
#define SMALL(a,b) (a<b)?a:b
#define FOR(i,o,n) for(auto i=o;i<n;i++)

int main()
{
ios_base::sync_with_stdio( false );
cin.tie(NULL);

lli t,a,b,c=0;
cin>>t;
while(t--)
{
    cin>>a>>b;
    if(a==b)
        cout<<"-1"<<endl;
    else
    {
        a=abs(a-b);
        for(auto i=1;i<=sqrt(a);i++)
        {
            if(a%i==0)
                c+=2;
            if(i*(a/i)==a)
                c--;
        }
    }
    cout<<c<<endl;
}

return 0;

}

edit: solved

You are not printing the answers in new line
add endl and you will get AC
:slight_smile:

Which you are doing here

no not working:slightly_frowning_face: