Untitled
unknown
plain_text
a year ago
355 B
8
Indexable
import java.util.Scanner;
public class P1 {
	public static int Sol(int n) {
		int sumValue = 1;
		while (n != 0) {
			sumValue *= n % 10;
			n /= 10;
		}
		return sumValue;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(Sol(n));
//		Sol(n);
	}
}Editor is loading...
Leave a Comment