#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. 2018.11.05 bzoj2143: 飞飞侠(最短路)

    传送门 最短路好题. 考虑对每个二维坐标建立一个高度属性. 这样每次如果在点(i,j,0)(i,j,0)(i,j,0)只能选择花费bi,jb_{i,j}bi,j​跳向(i,j,ai,j)(i,j,a_ ...

  2. hashCode() 和equals() 区别和作用(转)

    出处:https://www.jianshu.com/p/5a7f5f786b75 本章的内容主要解决下面几个问题: 1 equals() 的作用是什么? 2 equals() 与 == 的区别是什么 ...

  3. RNN文章总结

    1.RNN  基本结构类型 2. RNN 3.零基础入门深度学习(5) - 循环神经网络 4.

  4. Win7 VS2015环境编译NanoVG

    书接上回,Cairo编译好使用后,发现简单的每帧画100条随机线段就卡得不行,装了个gooreplacer( http://liujiacai.net/gooreplacer/ )上stackover ...

  5. c# devexpress学习绘图

    用字典方式存储数据并绘图:http://www.xuebuyuan.com/465384.html 数据库存储数据,并对图形作各种设置:http://www.cnblogs.com/xuhaibiao ...

  6. IntellJ IDEA2017 springboot2.0.2中读取配置

    IDEA 路径 src\main\resources\application.properties 配置文件名称为 application.properties 默认的位置在classpath根目录下 ...

  7. 严格别名规则“-fstrict-aliasing”和“-fno-strict-aliasing”及类型双关

    “-fstrict-aliasing”表示启用严格别名规则,“-fno-strict-aliasing”表示禁用严格别名规则,当gcc的编译优化参数为“-O2”.“-O3”和“-Os”时,默认会打开“ ...

  8. CSS Transform Style

    As CSS3 developing quickly, the transform style can be written conviently. I find that it is an inte ...

  9. Flash网页小游戏开发教程

    架设服务器 地图 程序员

  10. OpenGL中的渐变颜色绘图(应力可视化)

    #include <GL/glut.h> #include <iostream> #include <cmath> using namespace std; ; ; ...