Ruby n, 1 = gets.split.map &:to_i -
this question has answer here:
- ruby x,y = gets.split.map &:to_i 1 answer
i looking @ ruby code. unsure happening on line:
n,1 = gets.split.map &:to_i
i understand input array of strings being mapped array of integers why being assigned n,1?
that line of code doesn't anything, it's syntaxerror
. can't assign 1
, that's not legal name local variable.
Comments
Post a Comment