- Is it explicitly allowed? Then these answers are acceptable.
- Is it explicitly disallowed? Then these answers are not acceptable.
- None of above? Then:
- If it explicitly specifies another way to receive input (e.g. STDIN), then I would assume that it's not allowed, because the spec gives another way to receive input.
- If you are not sure, leave a comment. If the OP doesn't reply, then the chance that they will ever accept an answer is low, and then I think it is OK to use a variable as input.
In this case, leaving a comment seems the best, because if your submission is an "equivalent subprogram", then there is nowhere specified how the input for this subprogram should be given. But because the question is migrated from Stack Overflow and the OP doesn't have an account here, the chance that he will reply (and accept an answer) is very low, so in this case, I'd say it is OK.