(String[] args)
| 5 | public class Problem10 { |
| 6 | |
| 7 | public static void main(String[] args) { |
| 8 | // TODO Auto-generated method stub |
| 9 | Scanner scan = new Scanner(System.in); |
| 10 | int[] digitCount; |
| 11 | int N, number; |
| 12 | |
| 13 | N = scan.nextInt(); |
| 14 | scan.nextLine(); |
| 15 | digitCount = new int[N]; |
| 16 | |
| 17 | for (int i = 0; i < N; i++) { |
| 18 | number = scan.nextInt(); |
| 19 | |
| 20 | while (number < 0 || number > 10000001) { |
| 21 | number = scan.nextInt(); |
| 22 | |
| 23 | } |
| 24 | |
| 25 | digitCount[i] = Integer.toString(number).length(); |
| 26 | } |
| 27 | scan.close(); |
| 28 | |
| 29 | for (int i = 0; i < digitCount.length; i++) { |
| 30 | System.out.printf("%d\n", digitCount[i]); |
| 31 | } |
| 32 | |
| 33 | } |
| 34 | |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected