With no specific language requirements (pseudo code is totally fine) and they can't even write a for loop. We ask to see how they approach the problem, not to get a perfect answer. Ask questions about it, talk through your reasoning, work with us on it. Not worried about off by 1 or specific syntax, just getting to know them and how they work through a problem.
We tried hiring a few people who didn't perform as well on this, and it was a mistake every time. And anyone who had no problems with it was always a good hire.
Now, obviously there is a problem with the screening process when people who can't actually write a for loop get through it, but until that is fixed, you have to filter them out somehow. How have you approached that in the past? I would honestly like to know how to fix it.
The grads probably aren't aware enough to know the difference, being new grads. And I'd wager that's why you're targeting them.