題目: 乘乘樂
import java.util.Scanner;
public class Multi{
public static Scanner sc = new Scanner(System.in);
public static void main(String args[]){
sc.nextInt();
while(sc.hasNext()){
Integer n = 1;
for(char i : sc.next().toCharArray()){
n *= Character.getNumericValue(i);
}
System.out.println(n);
}
}
}
沒有留言:
張貼留言