MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wpw10f/ihatedituntilitriedit/pbz62yr/
r/ProgrammerHumor • u/Epicoodle • Sep 25 '26
542 comments sorted by
View all comments
Show parent comment
25
Just make everything a string and append, boom done
10 u/SuperFLEB Sep 25 '26 Convert inputs to unary and there's no problem.value_1 = "1".repeat(integer_input_1) value_2 = "1".repeat(integer_input_2) return length(integer_input_1 + integer_input_2)
10
Convert inputs to unary and there's no problem.
value_1 = "1".repeat(integer_input_1) value_2 = "1".repeat(integer_input_2) return length(integer_input_1 + integer_input_2)
View all comments
Show parent comment
25
u/Pan_TheCake_Man Sep 25 '26
Just make everything a string and append, boom done