Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 948 characters in body
Source Link
naffetS
  • 13.1k
  • 2
  • 22
  • 54

Vyxal, 32 bytes

0f»#tṪİしろいしかく»6τʀ»3¡s↳‡∴»+/τ+Jf18vḋ›i

Try it Online!

Port of 05AB1E.

How?

0f»#tṪİしろいしかく»6τʀ»3¡s↳‡∴»+/τ+Jf18vḋ›i
0f # Push ten converted to a list of digits: [1, 0]
 »#tṪİしろいしかく» # Push compressed integer 145680302990
 6τ # Convert to base-64 as list: [2, 7, 43, 14, 16, 14, 14]
 ʀ # Convert each to a range [0, item]
 »3¡s↳‡∴» # Push compressed integer 180810357611003
 +/τ # Convert to base-148 as list: [17, 30, 48, 129, 93, 147, 111]
 + # Add the values in these two lists at the same positions
 J # Join the [1, 0] and this list together
 f # Flatten this list
 18vḋ # Divmod each by 18
 › # Increment each
 i # 0-based index the input into this list

Vyxal, 32 bytes

0f»#tṪİしろいしかく»6τʀ»3¡s↳‡∴»+/τ+Jf18vḋ›i

Try it Online!

Port of 05AB1E.

Vyxal, 32 bytes

0f»#tṪİしろいしかく»6τʀ»3¡s↳‡∴»+/τ+Jf18vḋ›i

Try it Online!

Port of 05AB1E.

How?

0f»#tṪİしろいしかく»6τʀ»3¡s↳‡∴»+/τ+Jf18vḋ›i
0f # Push ten converted to a list of digits: [1, 0]
 »#tṪİしろいしかく» # Push compressed integer 145680302990
 6τ # Convert to base-64 as list: [2, 7, 43, 14, 16, 14, 14]
 ʀ # Convert each to a range [0, item]
 »3¡s↳‡∴» # Push compressed integer 180810357611003
 +/τ # Convert to base-148 as list: [17, 30, 48, 129, 93, 147, 111]
 + # Add the values in these two lists at the same positions
 J # Join the [1, 0] and this list together
 f # Flatten this list
 18vḋ # Divmod each by 18
 › # Increment each
 i # 0-based index the input into this list
Source Link
naffetS
  • 13.1k
  • 2
  • 22
  • 54

Vyxal, 32 bytes

0f»#tṪİしろいしかく»6τʀ»3¡s↳‡∴»+/τ+Jf18vḋ›i

Try it Online!

Port of 05AB1E.

AltStyle によって変換されたページ (->オリジナル) /