- import java.util.Scanner;
- import java.io.FileReader;
- import java.io.BufferedReader;
- public class Ch04 {
-
- public static void main(String args[])
- {
-
- Scanner s=new Scanner(System.in);
- String str;
- int[] n=new int[3];
- for(int i=0; i<=2; i++)
- {
- n[i]=s.nextInt();
- }
- try
- {
-
- BufferedReader br=new BufferedReader(new FileReader("read.txt"));
- for(int i=0; i<=2; i++)
- {
- str=br.readLine();
- for(int j=0; j<str.length(); j++)
- {
- if(j<n[i])
- {
- System.out.print(n[i]);
- }
- else
- {
- System.out.print(str.charAt(j));
- }
- }
- System.out.println();
- }
-
- }
- catch(Exception e)
- {
- System.out.println("error");
- }
-
- }
-
- }
複製代碼 |