On that challenge you have to solve that challenge.
Contest is over! Check the end of the question
Specs:
- Write the smallest code (Any language*).
- The score of an answer is the sum of:
- Code length without whitespace.
- Number of answers using that same language squared.
- Length of the name of the biggest language on the contest minus the length of your language.
- Downvotes minus Upvotes (a.k.a. minus Total of Votes)
- Write the position of the users and the score.
- Each user can write only one answer.
- The lowest score wins.
Testing:
So, at the end of the contest, a possible input could be (STDIN):
The columns are: Username, Language, Code length(w/o whitespace) and TotalVotes
UserA Python 100 1
UserB Perl 30 2
UserC Java 500 3
UserD Brainfuck 499 4
UserE Perl 29 5
If your user name has spaces like "My User Name" it'll become "MyUserName" so the input will always have exactly 4 columns.
The output will be (STDOUT):
1 UserE 33
2 UserB 37
3 UserA 103
4 UserD 496
5 UserC 503
Explanation:
User P N^2 L V
A 100 1 3 -1
B 30 4 5 -2
C 500 1 5 -3
D 499 1 0 -4
E 29 4 5 -5
Brainfuck is the largest name with 9 chars (9 - 9 = 0
).
Perl and Java have 4 chars (9 - 4 = 5
).
Python has 6 chars (9 - 6 = 3
).
Perl has 2 entries so each get 4 extra points.
About languages:
The name of the language must contain only English letters (i.e. [A-Za-z]) and those which don't fit that must be "translated" to something else.
By the end of the contest, every language must have it's representation (You may propose better representations)
Examples:
Python3 -> Python
Ruby1.9 -> Ruby
Shell Script -> Shell
C++ -> Cpp
C# -> CSharp
><> -> Fish
Deadline: August 20, 2011 00:00 UTC
At the end of the contest, the winner must use his/her program to find the winner. It's allowed to non winners to use their programs to find the winner and tell him/her to use his/her program to find the winner. :)
The winner (see above) gets the answer accepted!
*The Whitespace language has the unfair advantage of being able to introduce unlimited complexity without a penalty on the character count. Answers written in Whitespace may be on the contest but can't win.
If you can make the logic of your program in whitespaces, you also can't win. That's a subjective topic, but if your program can increase considerably in size without being penalized, it falls in that condition.
Final Input
Alphabetical order of names (as of Aug 20th 2011 UTC 00:00)
boothby Sage 41 9
Harpyon Python 203 4
JBernardo Python 184 7
JoeyAdams PostgreSQL 225 6
jpjacobs AWK 269 4
Lowjacker Ruby 146 2
PeterTaylor Golfscript 82 4
rmackenzie CommonLisp 542 2
shesek Javascript 243 3
userunknown Scala 252 1
As both mine and boothby's answers are not allowed to win, the winner should proclaim himself the winner by editing this question and posting the final output below.
Final Output
1 boothby 39
2 PeterTaylor 79
3 Lowjacker 151
4 JBernardo 185
5 Harpyon 207
6 JoeyAdams 220
7 shesek 241
8 userunknown 257
9 jpjacobs 273
10 rmackenzie 541