binary increment by nanayaT

io.Source.stdin.getLines.toList.map{s=>println(s.reverse.dropWhile{_=='1'}.replaceFirst("0","1").reverse.padTo(s.size,"0").mkString)}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page