You can't just use stdin + stdout.
First of all, you will need to create a new process in your OS every time you have a new unit.
Second of all, there is toooo much different information about the field and also some methods like "senseNearbyRobots" which you may wanna call and may wanna not. So you have to either parse a lot of input from stdin (and 95% you will not use), or to run some sort of interactive talking with server (by using flushes). In all cases it would be really painful.
Third of all, it would be really slow, there is a lot of information to be passed during one round.
On codingame (for example) not so much in input about the field, because games are much more easy. And you have just one unit to control there (usually), so no problem with running couple of processes.