import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
Map<Character, String> map = new HashMap<Character, String>();
map.put(' ', "%20");
map.put('!', "%21");
map.put('$', "%24");
map.put('%', "%25");
map.put('(', "%28");
map.put(')', "%29");
map.put('*', "%2a");
while (true)
{
String s = sc.nextLine();
if ("#".equals(s))
break;
StringBuilder sb = new StringBuilder();
for (char c : s.toCharArray())
{
String ss = map.get(c);
sb.append(ss == null ? c : ss);
}
System.out.println(sb);
}
}
}
ZOJ-2932
最新推荐文章于 2019-09-23 21:41:27 发布