Fork me on GitHub

NYOJ题目113字符串替换

--------------------------------------

 

二连水。

 

AC代码:

 1 import java.io.BufferedReader;
 2 import java.io.IOException;
 3 import java.io.InputStreamReader;
 4 
 5 public class Main {
 6 
 7     public static void main(String[] args) throws IOException {
 8         
 9         BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
10         
11         boolean first=true;
12         while(first || reader.ready()){
13             first=false;
14             System.out.println(reader.readLine().replaceAll("you","we"));;
15         }
16         
17     }
18     
19 }

 

题目来源: http://acm.nyist.net/JudgeOnline/problem.php?pid=113

posted @ 2016-09-21 18:34  CC11001100  阅读(245)  评论(0编辑  收藏  举报