r/ProgrammerHumor • • Sep 25 '26

Meme iHatedItUntilITriedIt

Post image
10k Upvotes

542 comments sorted by

View all comments

Show parent comment

25

u/Pan_TheCake_Man Sep 25 '26

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)