Shortest Code Contest
Write a piece of code to solve some mathematical expressions.These mathematical expressions will be very simple - each expression will consist of two numbers and a single operation.
All numbers will be positive integers less than 100, and the only operations will be +,- and *.
There will be multiple test cases - the first line will indicate the number of tests.
Oh, I almost forgot to mention: you can't use semicolons!
Your score will be (86 / N)2 x 10, where N is the number of non-whitespace characters in your code.
Sample Input
3 6*7 67-25 31+11
Sample Output
42 42 42
All Submissions
Best Solutions
Point Value: 10 (partial)
Time Limit: 2.00s
Memory Limit: 16M
Added: Dec 14, 2008
Languages Allowed:
C++03, C, C++11
Comments (Search)
(My solution is a bit hackish, works 50% of the time)
Good way to get a cool number of points though.