fork download
  1. import java.util.*;
  2. import java.math.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args)
  7. {
  8. Scanner in = new Scanner(System.in);
  9. in.useDelimiter(""); //Чтение по одному символу.
  10. char a;
  11. char b = in.next().charAt(0);
  12. System.out.print(b);
  13. System.out.print(' ');
  14. while(in.hasNext()){
  15. a = in.next().charAt(0);
  16. System.out.printf("%x ", a^b);
  17. b=a;
  18. }
  19. }
  20. }
Success #stdin #stdout 0.07s 2184192KB
stdin
pack my box with five dozen liquor jugs
stdout
p 11 2 8 4b 4d 14 59 42 d 17 58 57 1e 1d 1c 48 46 f 1f 13 45 44 b 15 1f b 4e 4c 5 18 4 1a 1d 52 4a 1f 12 14