Skip to main content
Commonmark migration
Source Link

#Python, 80 73 72 bytes

Python, 80 73 72 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a*a)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

#Python, 80 73 72 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a*a)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

Python, 80 73 72 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a*a)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

save another byte
Source Link
PattuX
  • 361
  • 3
  • 8

#Python, 80 7373 72 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a**2a*a)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!Try it online!

#Python, 80 73 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a**2)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

#Python, 80 73 72 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a*a)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

improve solution by 7 bytes
Source Link
PattuX
  • 361
  • 3
  • 8

#Python, 8080 73 bytes

First submission, don't be too harsh q:

0-indexed

r=range;f=lambdalambda x,y:[(a-1,b//a,cb%a)for a in rrange(25)for b in r(a)for c in rrange(aa**2)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!Try it online!

#Python, 80 bytes

First submission, don't be too harsh q:

0-indexed

r=range;f=lambda x,y:[(a-1,b,c)for a in r(25)for b in r(a)for c in r(a)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

#Python, 80 73 bytes

First submission, don't be too harsh q:

0-indexed

lambda x,y:[(a-1,b//a,b%a)for a in range(25)for b in range(a**2)][70*x+y]

Creates a list of length 4900 with all pyramind coordinates and returns a different list entry for each input.

Try it online!

Source Link
PattuX
  • 361
  • 3
  • 8
Loading