Last wednesday I had that competition and today I received the solutions. I believe I should get 104/108 but depending on how they correct it could be like 90%. Anyway enough for the finals :)
There was one kind of question which I really liked and I thought to share those.
We had to give the shortest way to express following 5 things in function of min(a,b) , max (a,b) (which return respectively the minimum and the maximum of the 2 given parameters) ,+,-,/ and *.
1. The greatest of 3 numbers a b and c
2. The absolute value of any number a.
3. The difference between a and the one closest to a. (a b and c as inputs)
4. If a<b: return 0 ; else return b (a and b are positive and a is not b)
5. same as 4. but a and b are integers. (note that for integers 3/5 is not 0.6 but 0 and a remainder of 3). This one should be shorter than the solution of 4.
5 was the only question I didn't answer correctly. Can you find the solutions to all 5?