#include<iostream>
#include<stdio.h>
#define M 350000
#define N 30000
using namespace std; int boo[];
int prime[N];
void give_list();
int main()
{
memset(boo,,sizeof(int)*);
give_list();
//freopen("acm.acm","r",stdin);
int tem;
int sum;
int i;
int j;
int ans;
sum = ;
ans = ;
for(j = ; j < ; ++ j)
{
cin>>sum;
for(i = ; i < N; ++ i)
{ while(sum % prime[i] == )
{
++ boo[prime[i]];
sum /= prime[i];
if(sum == )
break;
}
if(sum == )
break;
}
}
ans = ;
for(i = ; i < ; ++ i)
{
if(boo[i])
ans *= ++boo[i];
}
cout<<ans%<<endl;
system("pause");
} void give_list()
{
bool prime_1[M];
int i;
int j;
memset(prime_1,true,sizeof(bool)*M);
prime_1[] = false;
for(i = ; i < M; ++ i)
{
if(prime_1[i])
{
j = i * ;
while(j < M)
{
prime_1[j] = false;
j = j + i;
}
}
}
j = ;
for(i = ; i < M; ++ i)
{
if(prime_1[i])
{
prime[j] = i;
++ j;
}
}
}

POJ 2603的更多相关文章

  1. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  2. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  3. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  4. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  5. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  6. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  7. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

  8. POJ 2752 Seek the Name, Seek the Fame [kmp]

    Seek the Name, Seek the Fame Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17898   Ac ...

  9. poj 2352 Stars 数星星 详解

    题目: poj 2352 Stars 数星星 题意:已知n个星星的坐标.每个星星都有一个等级,数值等于坐标系内纵坐标和横坐标皆不大于它的星星的个数.星星的坐标按照纵坐标从小到大的顺序给出,纵坐标相同时 ...

随机推荐

  1. shell常见命令

    awk awk是个很好用的东西,大量使用在linux系统分析的结果展示处理上.并且可以使用管道, input | awk ''  | output 1.首先要知道形式 awk 'command' fi ...

  2. PHP Libevent扩展安装及应用

    http://www.phpddt.com/php/libevent.html PHP Libevent扩展安装及应用

  3. int -2147483648 ----- 2147483647

    int最大值+1为什么是-2147483648最小值-1为什么是2147483647   今天一个新手学编程就问到这个问题,很多人第一次学编程肯定会遇到这个问题,大部分都知道是溢出之类的,用源码和补码 ...

  4. Arria10中PHY的时钟线结构

    发送器时钟网络由发送器PLL到发送器通道,它为发送器提供两种时钟 高速串行时钟——串化器的高速时钟 低速并行时钟——串化器和PCS的低速时钟 在绑定通道模式,串行和并行时钟都是由发送器的PLL提供给发 ...

  5. openssl建立证书,非常详细配置ssl+apache

    原文链接:http://blog.51yip.com/apachenginx/958.html openssl建立证书,非常详细配置ssl+apache 张映 发表于 2010-08-07 分类目录: ...

  6. linux ps查进程 kill关闭进程

    原文链接:http://blog.sina.com.cn/s/blog_53855ace0100ded4.html 首先,我们需要使用linux下另外一个ps命令查找与进程相关的PID号:ps aux ...

  7. 深入浅出javascript(二)函数和this对象

    一.函数对象的属性和方法 函数是一种数据类型,也是对象,这一点很明确.因此,函数对象也可以添加属性和方法,但是这里的属性和方法是静态的,之所以这样说,就是为了区别构造函数. 示例如下: ①创建一个空的 ...

  8. jquery中data()和js中dataset属性的区别

    INTRO html的标签属性data-允许用户自定义属性.原生javascript和jquery分别定义了dataset属性和data()方法对标签中的data属性进行操作. 取值: 如我们定义这样 ...

  9. C++ const方法及对象

    一.整体代码 01.cpp #include <iostream> using namespace std; class Test { public: Test(int x) : x_(x ...

  10. hive-内部表和外部表 对比

    建表时,需要考虑究竟建内部表还是外部表,内部表和外部表都有哪些不同? 内部表: 1. 数据存储位置:数据最终会被移动到 hive.metastore.warehouse.dir指定的路径下,以表名创建 ...