Keep on getting "X is not a valid value of type integer" where x is an integer

When I fail a problem I usually try to take the input my algorithim failed it on and paste it in the console in order to debug the issue. However, I keep on getting "X is not a valid value of type integer" where X is clearly some integer. For example, on https://leetcode.com/problems/shortest-path-with-alternating-colors/, the following input kept on giving "8 is not a valid value of type integer" in the console:

8
[[3,2],[0,3],[1,3],[3,6],[2,5],[5,0],[5,3],[5,6],[7,3]]
[[2,4],[6,6],[3,2],[6,0],[4,4],[0,2],[2,5],[4,5],[5,0],[0,3],[5,6],[3,7],[3,5],[0,6],[7,0],[7,1],[1,0],[7,4],[0,5]]
Comments (2)