POJ 2635 The Embarrassed Cryptographer
| Time Limit: 2000MS | Memory Limit: 65536K | |
| Total Submissions: 11359 | Accepted: 3026 |
Description
The young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his company. The cryptographic keys are created from the product of two primes, and are believed to be secure because there is no known method for factoring such a product effectively. What Odd Even did not think of, was that both factors in a key should be large, not just their product. It is now possible that some of the users of the system have weak keys. In a desperate attempt not to be fired, Odd Even secretly goes through all the users keys, to check if they are strong enough. He uses his very poweful Atari, and is especially careful when checking his boss' key.
Input
Output
Sample Input
Sample Output
Source
|
#include <iostream>
#include <cstdio> #include <cstring> using namespace std; int prim[80010],pn=0; void getPRIM() void change2big(char str[500]) bool letsMOD(int mod) int main() |
* This source code was highlighted by YcdoiT. ( style: Codeblocks )
POJ 2635 The Embarrassed Cryptographer的更多相关文章
- [ACM] POJ 2635 The Embarrassed Cryptographer (同余定理,素数打表)
The Embarrassed Cryptographer Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 11978 A ...
- POJ 2635 The Embarrassed Cryptographer (千进制,素数筛,同余定理)
The Embarrassed Cryptographer Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 15767 A ...
- poj 2635 The Embarrassed Cryptographer(数论)
题目:http://poj.org/problem?id=2635 高精度求模 同余模定理. 题意: 给定一个大数K,K是两个大素数的乘积的值.再给定一个int内的数L 问这两个大素数中最小的一个是 ...
- POJ 2635 The Embarrassed Cryptographer 大数模
题目: http://poj.org/problem?id=2635 利用同余模定理大数拆分取模,但是耗时,需要转化为高进制,这样位数少,循环少,这里转化为1000进制的,如果转化为10000进制,需 ...
- POJ 2635 The Embarrassed Cryptographer 高精度
题目地址: http://poj.org/problem?id=2635 题意:给出一个n和L,一直n一定可以分解成两个素数相乘. 让你判断,如果这两个素数都大于等于L,则输出GOOD,否则输出最小的 ...
- POJ - 2635 The Embarrassed Cryptographer(千进制+同余模)
http://poj.org/problem?id=2635 题意 给一个大数K,K一定为两个素数的乘积.现给出一个L,若K的两个因子有小于L的,就输出BAD,并输出较小的因子.否则输出GOOD 分析 ...
- POJ 2635 The Embarrassed Cryptographer(大数求余)
题意:给出一个大数,这个大数由两个素数相乘得到,让我们判断是否其中一个素数比L要小,如果两个都小,输出较小的那个. 分析:大数求余的方法:针对题目中的样例,143 11,我们可以这样算,1 % 11 ...
- 【阔别许久的博】【我要开始攻数学和几何啦】【高精度取模+同余模定理,*】POJ 2365 The Embarrassed Cryptographer
题意:给出一大数K(4 <= K <= 10^100)与一整数L(2 <= L <= 106),K为两个素数的乘积(The cryptographic keys are cre ...
- (POJ2635)The Embarrassed Cryptographer(大数取模)
The Embarrassed Cryptographer Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13041 Accep ...
随机推荐
- CF 321B Kefa and Company(贪心)
题目链接: 传送门 Kefa and Company time limit per test:2 second memory limit per test:256 megabytes Desc ...
- 解决Cookie乱码问题
写了一个cookie的定义和获取,结果我输入中文后,页面报错 报错信息如下: type Exception report message An exception occurred processin ...
- K米交流会现场图
- HD2059龟兔赛跑(DP)
题目链接 直接拿来当贪心做了=_=,然后就懵逼了 动态规划,本弱真没想到=_= #include <iostream> #include <cstdio> #include & ...
- (转)雅虎工程师提供的css初始化示例代码
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,b ...
- Linux bash 中,如何将正常信息和错误信息输出到文件
问题描述: $ command 2>> error $ command 1>> output 是否有方法,在bash同一行,实现输出stderr到error文件,输出stdou ...
- Apache+php+mysql+SQLyog在windows7下的安装与配置图解
先准备好软件: Apache官方下载地址:httpd-2.2.25-win32-x86-openssl-0.9.8y.msi,更多版本在这里: php官方下载地址:php-5.4.37-Win32-V ...
- IT项目管理感悟
做项目的时候,切记做好需求分析,列出需求清单,需要考虑好每一个细节,一个机柜是否需要PDU,KVM,服务器放置位置,放置几台服务器,服务器是几U的,IP段规划都需要事先规划好,并且文档化.---记住这 ...
- CodeLite的姿势
在Mac上安装cscope 1.下载cscope的Zip压缩包 2.解压 3.打开终端,进入解压目录,运行 ./configure make make install 4.在CodeLite中,在Pl ...
- SRS(simple-rtmp-server)
1.Push h.264 to rtmp server from tcp.