þмS¡þO
Попробуйте онлайн.
Объяснение:
þм # Only leave the non-digits of the (implicit) input-string
# i.e. "the 5is 108 seCONd4 a" → "the is seCONd a"
S # Split it into a list of characters
# → ["t","h","e"," ","i","s"," "," ","s","e","C","O","N","d"," ","a"]
¡ # Split the (implicit) input-string by each of these characters
# → ["","","","","5","","","108","","","","","","","4","",""]
þ # Remove the empty strings by only leaving the digits
# → ["5","108","4"]
O # And sum these numbers (which is output implicitly)
# → 117
"the 5is 108 seCONd4 a"приведет к тому,117что5+108+4=117). Кроме того, каждый «вопрос» здесь должен иметь тег условия победы . В этом случае я предполагаю, что это [code-golf] (являясь кратчайшим возможным решением)?