fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
  10. String str = bufferedReader.readLine();
  11. char[] s = str.toCharArray();
  12. for(int i = 0; i < str.length(); i++) {
  13. if(s[i]>='0' && s[i]<'9'){
  14. s[i]++;
  15. }
  16. else if(s[i]=='9') s[i]='0';
  17. }
  18. System.out.println(s);
  19. }
  20. }
Success #stdin #stdout 0.04s 2184192KB
stdin
99999999999
stdout
00000000000