fork download
  1. import java.io.BufferedReader;
  2. import java.io.InputStreamReader;
  3. public class Main {
  4. public static void main (String[] args) throws Exception{
  5. int code;
  6. int count = 0;
  7. int n[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  8. while ((code = br.read()) != -1) {
  9. if (code >= 48 && code <= 57) n[code - 48]++;
  10. }
  11. for (int i = 0; i < 10; i++) {
  12. if (n[i] == 0) count++;
  13. }
  14. System.out.println(count);
  15. for (int i = 0; i < 10; i++) {
  16. if (n[i] == 0) System.out.print(i + " ");
  17. }
  18. }
  19. }
Success #stdin #stdout 0.05s 2184192KB
stdin
+38 (037) 123-4-765
stdout
1
9