fork(3) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static String f(String t)
  8. {
  9. String s="";
  10. for(String w : t.split(" "))
  11. {
  12. if(w.equalsIgnoreCase("force")|w.equalsIgnoreCase("first"))
  13. {
  14. s+=" "+w.charAt(0)
  15. +(char)(w.charAt(1)+(w.charAt(1)=='o'|w.charAt(1)=='O'?-6:6))
  16. +w.charAt(2)
  17. +(char)(w.charAt(3)+(w.charAt(3)=='c'|w.charAt(3)=='C'?16:-16))
  18. +(char)(w.charAt(4)+(w.charAt(4)=='e'|w.charAt(4)=='E'?15:-15));
  19. } else s+=" "+w;
  20. }
  21. return s.substring(1,s.length());
  22. }
  23.  
  24. public static void main (String[] args) throws java.lang.Exception
  25. {
  26. System.out.println("\u0000\u0001\u0002\u0003the Force of the firsT");
  27. System.out.println(f("\u0000\u0001\u0002\u0003the Force of the firsT"));
  28. }
  29. }
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
the Force of the firsT
the First of the forcE