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 ...
随机推荐
- C#做窗体皮肤
网上有很好的皮肤控件 SkinEnigne可供使用: 具体步骤: 添加控件SkinEngine. 1.右键“工具箱”.“添加选项卡”,取名“皮肤”. 2.右键“皮肤”,“选择项”弹出对话框. 3.点击 ...
- SQL Server 分页
select top "+pageSize+" * from Table where id not in (select top "+(currentPage - 1) ...
- AngularJs ngClass、ngClassEven、ngClassOdd、ngStyle
这几个都关于样式及类名修改的,所以先把样式代码贴上吧. .red{color:red} .blue{color:blue} 写案例用到的样式就这么简单的两个,下面进入正题. ngClass ngCla ...
- 二项分布和Beta分布
原文为: 二项分布和Beta分布 二项分布和Beta分布 In [15]: %pylab inline import pylab as pl import numpy as np from scipy ...
- Linux nginx 配置 location 语法 正则表达式
location语法:location [=|~|~*|^~] /uri/ { - }默认:否上下文:server这个指令随URL不同而接受不同的结构.你可以配置使用常规字符串和正则表达式.如果使用正 ...
- linux 驱动入门4
不吃苦中苦,难为人上人.努力,给老婆孩子提供个良好的生活居住环境.http://www.cnblogs.com/nan-jing/articles/5806399.html上文提到了如何创建proc节 ...
- 用css3实现各种图标效果(1)
公共样式 应该说现在绝大多数公司的项目前端都是一团乱,不仅仅是js写的没有任何框架而言,css同样也是如此,导致项目如果要升级或者说有新的变更维护起来就特别困难. 最近领导决定花大时间整理一下css样 ...
- B2B电子商务网站技术框架
一 设计原则 电子商务平台总体结构的设计应从体系.功能.信息.过程等各个方面保证整个电子商务平台总体目标的实现,以提高市场竞争能力.总体结构的设计应考虑以下设计原则: 快速响应原则:商机稍纵即逝,网站 ...
- datatable group by
对datatable 里面的数据按某一特定的栏位进行分组并且按照某一规则 var query = from t in rate.AsEnumerable() group t by new { t1 ...
- Linux服务器间文件传输
利用scp传输文件 1.从服务器下载文件 scp username@servername:/path/filename /tmp/local_destination 例如scp codinglog@1 ...