Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source style for Google Code Jam

Tags:

input

I plan on doing the Code Jam competition next year. The problem is (something that I can't find anywhere) how do I set up my code to accept input and return an output?

I'm just confused as to how I am supposed to handle everything, say for example that I have to add 1 to the input and make the result the output, how would I handle the input/output?

I plan on using LUA. Thanks if you can. I think a code example would be best!

like image 434
Freesnöw Avatar asked May 23 '11 16:05

Freesnöw


3 Answers

Go to http://www.go-hero.net/jam/11/solutions and choose the problem and the language. You'll find all the examples you need there. Including Lua ones.

like image 143
Abizern Avatar answered Oct 21 '22 15:10

Abizern


http://www.go-hero.net/jam/ On this page you can see source code for every contestant. You should be able to answer your question from it.

like image 24
Kuba Avatar answered Oct 21 '22 16:10

Kuba


You can either do I/O on files or on stdin/stdout. It doesn't matter. I've seen examples that used files and examples that used stdin/stdout.

like image 22
Robin Green Avatar answered Oct 21 '22 14:10

Robin Green