题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
import java.util.*; import java.io.*; public class Main{ public static void main(String[] args) throws Exception{ //Scanner sc=new Scanner(System.in); BufferedReader sc=new BufferedReader(new InputStreamReader(System.in)); String line = sc.readLine(); StringBuilder sb=new StringBuilder(line); sb.reverse(); System.out.println(sb); } }将Scanner替换为BufferedReader,速度快了不少