Skip to main content
added 118 characters in body
Source Link

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

slightly longer answer (By 2 bytes)

n=int(input());print(str(n)in[f"{(k//n)**2}{(k%n)**2}"for k in range(n*n)])

and without a loop

n=int(input());m=k=0;exec('m+=f"{(k//n)**2}{(k%n)**2}"==str(n);k+=1;'*n**2);print(m>0)

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

slightly longer answer (By 2 bytes)

n=int(input());print(str(n)in[f"{(k//n)**2}{(k%n)**2}"for k in range(n*n)])

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

slightly longer answer (By 2 bytes)

n=int(input());print(str(n)in[f"{(k//n)**2}{(k%n)**2}"for k in range(n*n)])

and without a loop

n=int(input());m=k=0;exec('m+=f"{(k//n)**2}{(k%n)**2}"==str(n);k+=1;'*n**2);print(m>0)
added 126 characters in body
Source Link

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

slightly longer answer (By 2 bytes)

n=int(input());print(str(n)in[f"{(k//n)**2}{(k%n)**2}"for k in range(n*n)])

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

slightly longer answer (By 2 bytes)

n=int(input());print(str(n)in[f"{(k//n)**2}{(k%n)**2}"for k in range(n*n)])

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

Python 3.6 (with IO), 73 bytes

n=input();l=range(int(n));print(n in[f"{i*i}{j*j}"for i in l for j in l])

You could also use,

n=input();l=range(int(n));print({n}&{f"{i*i}{j*j}"for i in l for j in l})

But unfortunately it doesnt output booleon values rather it outputs, {n} for True and set() for False

Try on Online

added 215 characters in body
Source Link
Loading
added 136 characters in body
Source Link
Loading
Source Link
Loading