fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. import java.util.regex.*;
  5.  
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. System.out.println("666788899".replaceAll("(?<=(.))\\1", "0")); // => 600780090
  11. System.out.println("3888667222".replaceAll("(?<=(.))\\1", "0")); // => 3800607200
  12. }
  13. }
Success #stdin #stdout 0.07s 33844KB
stdin
Standard input is empty
stdout
600780090
3800607200