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 ...
随机推荐
- PriorityQueue
基本概念 顾名思义,PriorityQueue是优先级队列,它首先实现了队列接口(Queue),与LinkedList类似,它的队列长度也没有限制,与一般队列的区别是,它有优先级的概念,每个元素都有优 ...
- Python3 学习笔记------迭代器
python 迭代器 要理解python迭代器(iterator),先要理解两个概念:Iterable(可迭代对象).Iterator(迭代器) 先来help()一下Iterator: >> ...
- Beta版本——项目测试
前端测试 一.测试用例(tutor_distribution_0001) 测试内容 获取下拉框的输入测试 测试代码 $("#sub-confirm").click(function ...
- HTML5学习总结-05 HTML5表单
一 HTML5 新的类型 HTML5 拥有多个新的表单输入类型.这些新特性提供了更好的输入控制和验证. email url number range Date pickers (date, month ...
- 关于vs生成app错误提示,提醒Execution failed for task ':transformClassesWithDexForDebug'.
昨天将vs和android SDK更新之后生成app之后发现app生成出错,报错如下: FAILURE: Build failed with an exception. * What went wro ...
- gettextize与glib-gettextize的使用
gettextize在各种场合都可以使用,用于支持多语言开发 glib-gettextize运行后,会修改po/Makefile.in.in文件,导致后续都必须运行glib-gettextize ge ...
- C#中使用代码动态改变配置文件信息
static void Main(string[] args) { XmlDocument xDoc = new XmlDocument(); xDoc.Load("../../App.co ...
- asp.net中的窗口弹出实现,包括分支窗口 . ASP.NET返回上一页面实现方法总结 .
返回上一页的这个东东在我们做项目的时候一般是用于填写完表单后确认的时候,有对原来输入的数据进行修改或者更新时用的,或者是因为网站为了方便浏览者而有心添加的一个东东,一般这种功能的实现在ASP.NET中 ...
- 9月9日HTML上午表单元素2(框架、样式表)
五.框架 1.frameset是双标签框架集,如果使用框架集,当前页面不能有body. frameset属性:①cols代表左右拆分.cols=“300,*”表示左边框架宽300,右边宽剩余的宽度.* ...
- python --- Python中的callable 函数
python --- Python中的callable 函数 转自: http://archive.cnblogs.com/a/1798319/ Python中的callable 函数 callabl ...