# Do programs need to take input, if it is in the spec? [duplicate]

This question already has an answer here:

Recently, there have been some challenges involving the OEIS. Specifically, when given an index as input, the challenge spec involves output the item in the OEIS at that index. However, for constant sequences, there have been answers that discard the input because it is not needed to calculate the result.

Are answers allowed to not take input that is in the spec?

## marked as duplicate by Wheat Wizard, Community♦Aug 8 '17 at 21:05

• They should take input and ignore it / not use it – Mr. Xcoder Aug 8 '17 at 20:42
• @Mr.Xcoder that is my question. Do they actually have to take the input? If you are implementing A000012 in Python, do you ever have to call input()? Because some answers were saying "no" since they ignore it anyway and it's golfier not to. – Stephen Aug 8 '17 at 20:44
• @StepHen Just pretend it takes the input as argument and don't use it :p – dzaima Aug 8 '17 at 20:46
• @dzaima ok, but generally? What about languages without command line arguments, or something like this fiddle? – Stephen Aug 8 '17 at 20:47
• Whether a program takes input or not is a non-observable requirement. – Riley Aug 8 '17 at 20:48
• – AdmBorkBork Aug 8 '17 at 20:49
• @StepHen I was debating whether to add two examples, the other being JS without function parameter :p I see no reason why that would be invalid ever really, and it can be accessed with arguments[0] anyway. – dzaima Aug 8 '17 at 20:51
• related. I think this is a dupe but I'm still looking for the post. – Wheat Wizard Aug 8 '17 at 21:00
• @WheatWizard it's the opposite (I think) – Stephen Aug 8 '17 at 21:02
• here it is – Wheat Wizard Aug 8 '17 at 21:05

If the output of the program matches the desired result for the given input (even though the program does not make a call to the input (e.g: input() in Python), the answer is correct. Unless specified otherwise (i.e, a spec like the programs must use the given input in some way), every submission that gives correct results should be considered valid.