-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP750.java
More file actions
33 lines (27 loc) · 769 Bytes
/
P750.java
File metadata and controls
33 lines (27 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package p700_799;
import java.util.Scanner;
//accepted
public class P750 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n != 0){
int aux = n;
int contadorCeros = 0;
while (aux>9){
int acumulador = 1;
while (aux != 0){
if (aux%10 != 0){
acumulador = acumulador * (aux%10);
} else {
contadorCeros++;
}
aux/=10;
}
aux = acumulador;
}
System.out.println(10*aux+contadorCeros);
n = sc.nextInt();
}
}
}