If they write something that compiles, give them a point. If it is well commented, give them another point. If the results are correct, give them another point. More than one language would get another point as would finishing early, etc.
It's pretty easy to weed-out people who cannot program by doing this and it doesn't take that long.