题解 | #字符逆序#
字符逆序
https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.text.DateFormat; import java.text.DecimalFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.*; import java.util.stream.IntStream; import java.util.stream.Stream; import static java.util.Arrays.*; import static java.util.stream.Stream.*; public class Main { public static void main(String[] args) throws IOException { testTh(); } private static void testTh() throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String str; StringBuilder sb = new StringBuilder(); while ((str = bf.readLine()) != null) { String[] s = str.split(" "); for (String s1 : s) { sb.append(s1).append(" "); } System.out.println(sb.reverse().toString().substring(1)); } } }