fork download
  1. import java.io.BufferedReader;
  2. import java.io.BufferedWriter;
  3. import java.io.IOException;
  4. import java.io.InputStreamReader;
  5. import java.io.OutputStreamWriter;
  6.  
  7. public class Main {
  8. public static void main(String[] args) throws IOException{
  9.  
  10. String alpa = "abcdefghijklmnopqrstuvwxyz";
  11.  
  12. String str = read.readLine().toLowerCase();
  13.  
  14. if (str.toCharArray().length > 100) {
  15. return;
  16. }
  17.  
  18. for (char c : alpa.toCharArray()) {
  19. if (c != 'z') {
  20. write.write(str.indexOf(c)+" ");
  21. } else {
  22. write.write(str.indexOf(c));
  23. }
  24. }
  25.  
  26. write.flush();
  27. write.close();
  28. }
  29. }
Success #stdin #stdout 0.04s 2184192KB
stdin
baekjoon
stdout
1 0 -1 -1 2 -1 -1 -1 -1 4 3 -1 -1 7 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ￿