题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
var line=readline() var arr=[] if(line.length===1){ console.log(line) }else{ for(let i=0;i<line.length;i++){ arr.unshift(line[i]) } console.log(arr.join('')) }
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
var line=readline() var arr=[] if(line.length===1){ console.log(line) }else{ for(let i=0;i<line.length;i++){ arr.unshift(line[i]) } console.log(arr.join('')) }
相关推荐