ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1049. Brave Balloonists

Brave Ballons
Posted by Niveditha 7 Oct 2016 18:18
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
Posted by ToadMonster 7 Oct 2016 20:50
Please estimate max value of prod. Then compare it with int capacity.