Skip to main content
Commonmark migration
Source Link

Goal:

#Goal: YourYour program will take string input which may include any alphanumeric character including a space and hyphen, and your goal is to output the shortest amount of key presses on the d-pad to output the required string.

Considerations:

#Considerations: YouYou do not need to include the key pressed for pressing the actual character.
Focus always starts at the A
Enter = must be pressed at the end

#Goal: Your program will take string input which may include any alphanumeric character including a space and hyphen, and your goal is to output the shortest amount of key presses on the d-pad to output the required string.

#Considerations: You do not need to include the key pressed for pressing the actual character.
Focus always starts at the A
Enter = must be pressed at the end

Goal:

Your program will take string input which may include any alphanumeric character including a space and hyphen, and your goal is to output the shortest amount of key presses on the d-pad to output the required string.

Considerations:

You do not need to include the key pressed for pressing the actual character.
Focus always starts at the A
Enter = must be pressed at the end

Notice removed Draw attention by Tas
Bounty Ended with David Skrundz's answer chosen by Tas
Notice added Draw attention by Tas
Bounty Started worth 100 reputation by Tas
Fixing logical mistake
Source Link
Tas
  • 613
  • 6
  • 15

input: Code Golf
output: 4443

Explained:
A -> C = 32
C -> ^ = 6 (moving to the left)
^ -> o = 5
o -> d = 2
d -> e = 1
e -> + = 5
+ -> _ = 1
_ -> + = 1
+ -> G = 3
G -> o = 3
o -> l = 3
l -> f = 5
f -> = = 6

input: Code Golf
output: 44

Explained:
A -> C = 3
C -> ^ = 6 (moving to the left)
^ -> o = 5
o -> d = 2
d -> e = 1
e -> + = 5
+ -> _ = 1
_ -> + = 1
+ -> G = 3
G -> o = 3
o -> l = 3
l -> f = 5
f -> = = 6

input: Code Golf
output: 43

Explained:
A -> C = 2
C -> ^ = 6 (moving to the left)
^ -> o = 5
o -> d = 2
d -> e = 1
e -> + = 5
+ -> _ = 1
_ -> + = 1
+ -> G = 3
G -> o = 3
o -> l = 3
l -> f = 5
f -> = = 6

Tweeted twitter.com/#!/StackCodeGolf/status/625174705612398592
Updated challenge timeframe
Source Link
Tas
  • 613
  • 6
  • 15

The winning submission (I'll allow at least 48h1w) will be the shortest solution (in bytes). As this is my first question, I hope this is clear and not too hard.

The winning submission (I'll allow at least 48h) will be the shortest solution (in bytes). As this is my first question, I hope this is clear and not too hard.

The winning submission (I'll allow at least 1w) will be the shortest solution (in bytes). As this is my first question, I hope this is clear and not too hard.

Source Link
Tas
  • 613
  • 6
  • 15
Loading