problem occuring at line 18 of code; sb.insert(i, d)
code: import java.util.;
import java.io.;
public class Main {
public static void main(String args[]) throws IOException {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
asciiDifference(s);
}
public static void asciiDifference(String s) {
StringBuilder sb = new StringBuilder(s);
int d = 0;
for(int i = 1; i < sb.length(); i++) {
d = sb.charAt(i) - sb.charAt(i-1);
sb.insert(i, d);
i++;
}
System.out.println(sb);
}
}