Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Published on BBC, GCHQ have set the challenge below. Would make a fun simple coding challenge. My thought is to brute-force, is there a more efficient way to solve it?
"Take the digits 1,2,3 up to 9 in numerical order and put either a plus sign or a minus sign or neither between the digits to make a sum that adds up to 100. For example, one way of achieving this is: 1 + 2 + 34 - 5 + 67 - 8 + 9 = 100, which uses six plusses and minuses. What is the fewest number of plusses and minuses you need to do this?"
Edit: disclosure: I believe the challenge has passed already and I'm too lazy to enter anyway so don't worry about me or anyone stealing ideas!
undefined
challenge
coding