@@ -0,0 +1,1604 @@
+import java.io.*;%0Aimport java.math.*;%0Aimport java.security.*;%0Aimport java.text.*;%0Aimport java.util.*;%0Aimport java.util.concurrent.*;%0Aimport java.util.regex.*;%0A%0Apublic class Solution %7B%0A%0A    // Complete the appendAndDelete function below.%0A    static String appendAndDelete(String s, String t, int k) %7B%0A        int index = -1;%0A        boolean big = false;%0A        for(int i=0;i%3Ct.length();i++)%7B%0A            if(i==s.length())%7B%0A                big = true;%0A                break;%0A            %7D%0A            if(s.charAt(i)!=t.charAt(i))%7B%0A                index = i;%0A                break;%0A            %7D%0A            %0A        %7D%0A        if(big)%7B%0A            if(t.length()-s.length()%3Ek) return %22No%22;%0A            else return %22Yes%22;%0A        %7D%0A        if(index==-1)%7B%0A            if(s.length()-t.length()%3Ek) return %22No%22;%0A            else return %22Yes%22;%0A        %7D%0A        else%7B%0A            int steps = s.length()+t.length()-2*index;%0A            if(steps%3E2*k) return %22No%22;%0A            else return %22Yes%22;%0A        %7D%0A    %7D%0A%0A    private static final Scanner scanner = new Scanner(System.in);%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(%22OUTPUT_PATH%22)));%0A%0A        String s = scanner.nextLine();%0A%0A        String t = scanner.nextLine();%0A%0A        int k = scanner.nextInt();%0A        scanner.skip(%22(%5Cr%5Cn%7C%5B%5Cn%5Cr%5Cu2028%5Cu2029%5Cu0085%5D)?%22);%0A%0A        String result = appendAndDelete(s, t, k);%0A%0A        bufferedWriter.write(result);%0A        bufferedWriter.newLine();%0A%0A        bufferedWriter.close();%0A%0A        scanner.close();%0A    %7D%0A%7D%0A

add AppendAndDelete.java