Skip to main content
Commonmark migration
Source Link

#O, 13 bytes

O, 13 bytes

i{'+n#*".>"}d 

Explanation:

i Read standard input into a string and push it onto the stack. { }d For each character in the string... '+ Push "+". n# Convert the character (n) to its ASCII code. * Multiply the "+" by the character code to get the number of +'s needed. ".>" Push the string ".>". In O, the stack is printed after execution, so this prints out the result. 

#O, 13 bytes

i{'+n#*".>"}d 

Explanation:

i Read standard input into a string and push it onto the stack. { }d For each character in the string... '+ Push "+". n# Convert the character (n) to its ASCII code. * Multiply the "+" by the character code to get the number of +'s needed. ".>" Push the string ".>". In O, the stack is printed after execution, so this prints out the result. 

O, 13 bytes

i{'+n#*".>"}d 

Explanation:

i Read standard input into a string and push it onto the stack. { }d For each character in the string... '+ Push "+". n# Convert the character (n) to its ASCII code. * Multiply the "+" by the character code to get the number of +'s needed. ".>" Push the string ".>". In O, the stack is printed after execution, so this prints out the result. 
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 27
  • 47

#O, 13 bytes

i{'+n#*".>"}d 

Explanation:

i Read standard input into a string and push it onto the stack. { }d For each character in the string... '+ Push "+". n# Convert the character (n) to its ASCII code. * Multiply the "+" by the character code to get the number of +'s needed. ".>" Push the string ".>". In O, the stack is printed after execution, so this prints out the result.