This task should be implemented in Lua
to allow server to run and test the solution.
Please check these useful links: Quick Introduction on Lua
and online Lua sandbox. Also perhaps start with
simpler problems, like Hurkle.
As you may have already found, this web-site tries to automatically recognize the language in which solution is written by user, but is not always doing this correctly.
You now have a chance to try creating better algorithm yourself :)
Write a function in Lua
taking a text (program source code) and tells in which language this
program is written. In the simplest form it may look like this:
function lang_detect(prog)
return 'py'
end
You'll see, the checker tests your function against 21
sources - and to succeed we want at least 15
correct guesses. Your function should recognize these seven languages:
py
cpp
java
cs
js
php
go
Test sources are all picked from various user's submissions to several problems - so you probably may want to have a look at some random submissions for test data to train your algorithm.
That's all, good luck!