Skip to main content
Commonmark migration
Source Link

#Japt -m, 12 7 bytes

Japt -m, 12 7 bytes

Port of Jonathan's Python solution.

Takes x as the first input.

%VÄ+UzV

Try it

#Japt -m, 12 7 bytes

Port of Jonathan's Python solution.

Takes x as the first input.

%VÄ+UzV

Try it

Japt -m, 12 7 bytes

Port of Jonathan's Python solution.

Takes x as the first input.

%VÄ+UzV

Try it

added 131 characters in body; added 65 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt -m, 812 7 bytes

Port of Jonathan's Python solution.

Takes x as the first input.

Ç%VÄ+ZzV%VÄ+UzV

Try itTry it

#Japt, 8 bytes

Ç%VÄ+ZzV

Try it

#Japt -m, 12 7 bytes

Port of Jonathan's Python solution.

Takes x as the first input.

%VÄ+UzV

Try it

deleted 414 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt, 12 118 bytes

Will need to come back to this later, to see if it can be golfed further.

ÆVõ+XÃÕc ¯VÇ%VÄ+ZzV

Try itTry it

ÆVõ+XÃÕc ¯V     :Implicit input of integers U=n and V=x
Æ               :Map each X in the range [0,U)
 Võ             :  Range [1,V]
   +X           :  Add X to each
     Ã          :End map
      Õ         :Transpose
       c        :Flatten
         ¯V     :Slice to the Vth element

#Japt, 12 11 bytes

Will need to come back to this later, to see if it can be golfed further.

ÆVõ+XÃÕc ¯V

Try it

ÆVõ+XÃÕc ¯V     :Implicit input of integers U=n and V=x
Æ               :Map each X in the range [0,U)
 Võ             :  Range [1,V]
   +X           :  Add X to each
     Ã          :End map
      Õ         :Transpose
       c        :Flatten
         ¯V     :Slice to the Vth element

#Japt, 8 bytes

Ç%VÄ+ZzV

Try it

added 332 characters in body; deleted 19 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading
deleted 37 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading