I don't know any website that works the way you said, but most of these is just simples. You just have to read from standard input and print to standard output.
- http://www.spoj.pl/
- http://www.topcoder.com/
- http://code.google.com/codejam/
Also, most of the problems of the same site will work the same way, so once you solve your first problem, you just have to use its skeleton to solve others.