Skip to main content
added 1 character in body
Source Link
lynn
  • 69.7k
  • 11
  • 137
  • 285

Python 3, 5152 bytes

p=n=1 exec("p*=n*n;n+=1"*~"p*=n*n;n+=1;"*~-int(input())) print(p%n) 

Saved a byte thanks to xnor in chat.

Python 3, 51 bytes

p=n=1 exec("p*=n*n;n+=1"*~-int(input())) print(p%n) 

Saved a byte thanks to xnor in chat.

Python 3, 52 bytes

p=n=1 exec("p*=n*n;n+=1;"*~-int(input())) print(p%n) 

Saved a byte thanks to xnor in chat.

save a byte (thanks xnor!)
Source Link
lynn
  • 69.7k
  • 11
  • 137
  • 285

Python 3, 5251 bytes

m=n=intp=n=1 exec("p*=n*n;n+=1"*~-int(input()) a=1 while~-m:m-=1;a*=m*m) print(a%np%n) 

Saved a byte thanks to xnor in chat.

Python 3, 52 bytes

m=n=int(input()) a=1 while~-m:m-=1;a*=m*m print(a%n) 

Python 3, 51 bytes

p=n=1 exec("p*=n*n;n+=1"*~-int(input())) print(p%n) 

Saved a byte thanks to xnor in chat.

added 4 characters in body
Source Link
lynn
  • 69.7k
  • 11
  • 137
  • 285

Python 3, 5352 bytes

n=intm=n=int(input());a=i=1 while i<na=1 while~-m:a*=i*i;i+=1m-=1;a*=m*m print(a%n) 

Python 3, 53 bytes

n=int(input());a=i=1 while i<n:a*=i*i;i+=1 print(a%n) 

Python 3, 52 bytes

m=n=int(input()) a=1 while~-m:m-=1;a*=m*m print(a%n) 
Source Link
lynn
  • 69.7k
  • 11
  • 137
  • 285
Loading