fork download
  1. import java.util.*;
  2. import java.io.*;
  3.  
  4. public class Main
  5. {
  6. public static void main(String[] args) throws Exception
  7. {
  8. FastInput in = new FastInput(System.in);
  9. PrintWriter out = new PrintWriter(System.out, true);
  10.  
  11. String a, b;
  12. long x, y;
  13.  
  14. while((a = in.next()) != null) {
  15. b = in.next();
  16. x = in.convtoLong(a);
  17. y = in.convtoLong(b);
  18. out.println(x ^ y);
  19. }
  20. //out.close();
  21. }
  22. }
  23.  
  24. class FastInput
  25. {
  26.  
  27. public FastInput(InputStream stream)
  28. {
  29. br = new BufferedReader(new InputStreamReader(stream));
  30. st = null;
  31. }
  32.  
  33. public String next()
  34. {
  35. while(st == null || !st.hasMoreTokens()) {
  36. try {
  37. st = new StringTokenizer(br.readLine());
  38. } catch (Exception e) {
  39. throw new RuntimeException(e);
  40. }
  41. }
  42. return st.nextToken();
  43. }
  44.  
  45. public int nextInt()
  46. {
  47. return Integer.parseInt(next());
  48. }
  49.  
  50. public double nextDouble()
  51. {
  52. return Double.parseDouble(next());
  53. }
  54.  
  55. public long nextLong()
  56. {
  57. return Long.parseLong(next());
  58. }
  59.  
  60. public int convtoInt(String a)
  61. {
  62. return Integer.parseInt(a);
  63. }
  64.  
  65. public double convtoDouble(String a)
  66. {
  67. return Double.parseDouble(a);
  68. }
  69.  
  70. public long convtoLong(String a)
  71. {
  72. return Long.parseLong(a);
  73. }
  74. }
Runtime error #stdin #stdout 0.07s 380224KB
stdin
4 6
6 9
stdout
2
15