|
|
вернуться в форумBrave Ballons import java.util.*; public class BallonNumber { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int a[]=new int[10]; int count=0; int prod=1,i; for(i=0;i<10;i++) { a[i]=sc.nextInt(); } for(i=0;i<10;i++) { prod=prod*a[i]; } //System.out.println(prod); for(i=1;i<=prod;i++) { if (prod%i==0) { count+=1;
} } System.out.println(count); } } So this is my code but it says wrong answer but I get the same answer in ide.What is wrong with this code Re: Brave Ballons Please estimate max value of prod. Then compare it with int capacity. |
|
|