import java.io.*;public class Reverse
{
public static void main(String[] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=new String();
str=br.readLine();
while(!str.substring(str.length()-4).equals("tiuq"))
{
str+="\n"+br.readLine();
}
char[] cstr=new char[str.length()];
cstr=str.toCharArray();
for(int i=cstr.length-1;i>=0;i--)
{
System.out.print(cstr[i]);
}
}
}/*测试数据:
abcde
anihC
tiuq
*/
{
public static void main(String[] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=new String();
str=br.readLine();
while(!str.substring(str.length()-4).equals("tiuq"))
{
str+="\n"+br.readLine();
}
char[] cstr=new char[str.length()];
cstr=str.toCharArray();
for(int i=cstr.length-1;i>=0;i--)
{
System.out.print(cstr[i]);
}
}
}/*测试数据:
abcde
anihC
tiuq
*/
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货