10
Some of you may say that I am wasting my time, but this task does not give me peace for more than 500 days. It is required to write a program in Python 3.x that takes two numbers as input and displays their sum. The numbers are given in the following format:
a b
Some example test cases:
100 500 -> 600
3 4 -> 7
The length of the code is calculated with the formula max(code length without spaces or tabs or newlines, code length / 4). I know only 2 solutions, each of them has a length of 36 characters:
print(sum(map(int, input().split())))
and:
print(eval(input().replace(' ', '+')))
Also I know, that the exists solution with length of 34 symbols. You can check it on this website.
10
If spaces don't count, I have a 34-char solution (SHA1 is e3eb1f896cffc2dbff531ce5ba8fa25d34c22c76). I'm not sure though it would be good to publicly post a solution to what seems to be a continuing programming competition. Do we have a site policy on that?
– xnor – 2017-04-17T10:34:47.930@ xnor, it's very old task, nobody can stop you to solve this problem here. – Evgeny – 2017-04-17T10:43:48.813
1@xnor as we already got an 34-char solution, would you mind posting yours? Claudio's SHA1 is different than yours – Felipe Nardi Batista – 2017-04-18T11:04:25.090
2@FelipeNardiBatista It's the same thing with double quotes. – xnor – 2017-04-18T21:55:02.430