返回列表 發帖
  1. import java.io.BufferedReader;
  2. import java.io.FileReader;
  3. import java.util.Scanner;
  4. public class JP405 {
  5.     public static void main(String[] args) throws Exception {
  6.         int t[]=new int[3];
  7.         Scanner s=new Scanner(System.in);
  8.         for(int i=0; i<3; i++)
  9.             t[i]=s.nextInt();
  10.         BufferedReader br=new BufferedReader(new FileReader("read.txt"));
  11.         for(int i=0; i<3; i++)
  12.         {
  13.             String str=br.readLine();
  14.             for(int j=0, len=str.length(); j<len; j++)
  15.             {
  16.                 if(j<t[i])
  17.                     System.out.print(t[i]);
  18.                 else
  19.                     System.out.print(str.charAt(j));
  20.             }
  21.             System.out.println();
  22.         }
  23.     }
  24. }
複製代碼

TOP

返回列表