1 / 3
Feb 2019

#TWOSQRS - Two squares or not two squares
t=int(input())

for t in range(t):

def squares(c):
    i=2
    while (i*i <=c):
        count=0
        if(c%i ==0):
            while(c%i ==0):
                count+=1
                c/=i
            if(i%4==4 and count %2!=0):
                return False
        i=i+1
    return  c%4 !=3

c=int(input())
if(squares(c)):
    print("Yes")
else:
    print("No")

“”“suggestion why wrong answer “””

  • created

    Feb '19
  • last reply

    Feb '19
  • 2

    replies

  • 882

    views

  • 2

    users

Something doesn’t look right with that line

1
109609908788

expected answer is No