poj 1811解题报告
来源:互联网 发布:淘宝会员店加盟费多少 编辑:程序博客网 时间:2024/06/06 06:33
Prime Test
Time Limit: 6000MS Memory Limit: 65536KTotal Submissions: 17747 Accepted: 3644Case Time Limit: 4000MS
Description
Given a big integer number, you are required to find out whether it's a prime number.
Input
The first line contains the number of test cases T (1 <= T <= 20 ), then the following T lines each contains an integer number N (2 <= N < 254).
Output
For each test case, if N is a prime number, output a line containing the word "Prime", otherwise, output a line containing the smallest prime factor of N.
Sample Input
2510
Sample Output
Prime2
这道题就是miiler_rabin素数测试和pollard_rho质因子分解的标准模板题。。。第一次做这样的题,这道题我是参照网上别人的代码写的,作为学习,当做模板学习了.....
代码:
语言:c++
- poj 1811解题报告
- POJ 1811 解题报告
- poj数百篇解题报告
- poj 1141解题报告
- poj 1001解题报告
- poj 1011 解题报告
- poj 1087 解题报告
- poj 2153解题报告
- poj 2051解题报告
- POJ 1167 解题报告
- poj 1026 解题报告
- POJ 1077 解题报告
- POJ 1042 解题报告
- POJ 1095 解题报告
- POJ 1159解题报告
- poj 2312解题报告
- POJ 1001解题报告
- POJ 1002解题报告
- android UI进阶之可延伸的图像
- Moodle VS OLAT
- 关于java泛型
- select语句执行顺序
- POSIX多线程入门学习笔记
- poj 1811解题报告
- 回车符号和换行符号产生背景
- 生活随笔:再见2010
- C++注意的小细节 (二) 不要在vector内部数据上操纵vector
- [Oracle]Windows7下安装Oracle10G
- Linux 汇编语言开发指南
- Acrobat9.0激活方法
- C#进行SOCKET开发---当连接与与服务器断开时的问题
- 酷派tbl短信读取器发布