HDU1062 Text Reverse
来源:互联网 发布:淘宝客服打字要求 编辑:程序博客网 时间:2024/06/05 04:03
import java.io.BufferedInputStream;import java.util.Scanner;public class Main {public static void main(String args[]) {Scanner in = new Scanner(new BufferedInputStream(System.in));int n = in.nextInt();String s = in.nextLine();//吃掉换行符不可丢掉while(n-- > 0) {String string = in.nextLine();String [] array = string.split(" ");String temp = "";for(int i = 0; i < array.length; i++ ) {for(int j = array[i].length()-1; j >= 0; j-- ) {temp += array[i].charAt(j);}if(i + 1 == array.length)continue;temp += " ";}if(string.endsWith(" "))//防止原字符串尾部有空格temp += " ";System.out.println(temp);}}}
阅读全文
0 0
- hdu1062(Text Reverse)
- HDU1062:Text Reverse
- Text Reverse hdu1062 水题
- hdu1062 Text Reverse
- HDU1062 Text Reverse
- hdu1062:Text Reverse
- HDU1062 Text Reverse
- Hdu1062 Text Reverse
- hdu1062 - Text Reverse
- hdu1062-Text Reverse
- HDU1062 Text Reverse
- HDU1062 Text Reverse
- HDU1062 Text Reverse
- hdu1062——Text Reverse
- hdu1062 Text Reverse (c++输入输出流)
- hdu1062 Text Reverse(C语言)
- 面试100题系列之8单词反转 VS HDU1062——text reverse
- hdu1062-字符串翻转问题 reverse()
- Android7.0下载Apk自动安装
- RT-Thread 学习笔记(一)---系统节拍tick
- RT-Thread 学习笔记(二)---线程创建及任务间通信之中断锁
- 汇编语言基础知识(cortex-M3 指令)
- RT-Thread 学习笔记(三)——读取MCU ID及FLASH大小
- HDU1062 Text Reverse
- RT-Thread 学习笔记(四)——添加RTGUI组件
- RT-Thread 学习笔记(五)—— RTGUI代码解读
- HDU 5719Arrange(类似排列组合问题)
- The connected J-Link is defective,Proper operation cannot be guaranteed.......
- Windows10下安装TensorFlow(CPU、GPU)
- 控制台光标相关
- 堆和栈的区别
- 如何在桌面电脑上使用 SAS 硬盘