You are not logged in. Please login at www.codechef.com to post your questions!

×

Number of Factors (NUMFACT) Time Limit Extended

#include< stdio.h>
using namespace std;
int main()
{
    int a[10],n,t,i,pduct=1,count=0,j,k;
    scanf("%d",&t);
    for(j=0;j<t;j++)
    {   
        count=0;    
        scanf("%d",&n);
        for(i=0;i<n;i++)
        {
            scanf(" %d",&a[i]);
        pduct*=a[i];
        }
        for(k=1;k<=pduct;k++)
        {
            if(pduct%k==0)
        {
                count++;
        }
        }
        printf("%d\n",count);
    }
    return 0;
}
This question is marked "community wiki".

asked 27 Nov '14, 21:37

namankumar's gravatar image

0★namankumar
2521519
accept rate: 0%

edited 27 Nov '14, 21:42

kunal361's gravatar image

4★kunal361
6.0k133272


1
3
1000 1000 2000

How long it runs on your computer?

link

answered 27 Nov '14, 22:15

betlista's gravatar image

3★betlista ♦♦
16.8k49115225
accept rate: 11%

edited 27 Nov '14, 22:16

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×214
×17

question asked: 27 Nov '14, 21:37

question was seen: 522 times

last updated: 27 Nov '14, 22:16