Why wouldn't a qualified developer just run the code? Takes two seconds instead of ... whatever you're going for here.
Is it really faster to run the code than to just answer it? Like are people struggling to answer this question?
So for them, yes, it would clearly be faster to run the code than to work through it manually.
What you're doing here is selecting for candidates who are less comfortable with using the tools that they'd be expected to use every day in the role you're hiring for. It's likely to provide a negative signal.