题解 | #扭蛋机#
扭蛋机
http://www.nowcoder.com/practice/9d26441a396242a9a0f7d2106fc130c7
var n=parseInt(line)//返回数字
var res='';
while(n>0){
if((n/2)>Math.floor(n/2)){
n=(n-1)/2;
res='2'+res;
}
else{
n=(n-2)/2;
res='3'+res;
}
}
print(res)