fork download
  1. import java.util.*;
  2.  
  3. class Main
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. Scanner scan = new Scanner(System.in);
  8. String S;
  9. boolean loop = scan.hasNextLine();
  10.  
  11. while (loop){
  12. S = scan.nextLine();
  13. if (S.equals("#")) break;
  14. else{
  15. S = S.replace ("%", "%25");
  16. S = S.replace (" ", "%20");
  17. S = S.replace ("!", "%21");
  18. S = S.replace ("$", "%24");
  19. S = S.replace ("(", "%28");
  20. S = S.replace (")", "%29");
  21. S = S.replace ("*", "%2a");
  22. System.out.println(S);
  23. }
  24. }
  25. }
  26. }
  27.  
Success #stdin #stdout 0.12s 29292KB
stdin
Happy Joy Joy!
http://i...content-available-to-author-only...r.edu/icpc/
plain_vanilla
(**)
?
the 7% solution
#
stdout
Happy%20Joy%20Joy%21
http://i...content-available-to-author-only...r.edu/icpc/
plain_vanilla
%28%2a%2a%29
?
the%207%25%20solution