plc编程入门plc编程入门急

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&问题已关闭
代为完成个人任务
提问需要满足:其他人可能遇到相似问题,或问题的解决方法对其他人有所助益。如果通过其他方式解决遇到困难,欢迎提问并说明你的求知过程。
怎么用把这个东西用函数编写(C语言) 在线等,急!?
已有帐号?
无法登录?
社交帐号登录算法分析的题目 急 求助~~~_编程 - QQ志乐园
您的当前位置: &
算法分析的题目 急 求助~~~
来源: |人气:303 ℃|时间: 03:26:20
为了解决用户可能碰到关于"算法分析的题目 急 求助~~~"相关的问题,志乐园经过收集整理为用户提供相关的解决办法,请注意,解决办法仅供参考,不代表本网同意其意见,如有任何问题请与本网联系。"算法分析的题目 急 求助~~~"相关的详细问题如下:
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. InputThe input consists of no more than 20 test cases. Each test case is a line with the integers 4 ≤ K ≤ 10100 and 2 ≤ L ≤ 106 ≤ K is the key itself, a product of two primes. L is the wanted minimum size of the factors in the key. The input set is terminated by a case where K = 0 and L = 0. OutputFor each number K, if one of its factors are strictly less than the required L, your program should output "BAD p", where p is the smallest factor in K. Otherwise, it should output "GOOD". Cases should be separated by a line-break. Sample Input143 10143 20667 20667 302573 302573 400 0Sample OutputGOODBAD 11GOODBAD 23GOODBAD 31#include&iostream&using&int isPrime(int n){//测试一个数是否素数&for(int i=2;i&n;i++){&if(n%i==0) return 0;&}&return 1;}int main(){&int a[20][2],n,k,l,&cin&&k&&l;&for(n=0;(k!=0||l!=0)&&n&20;n++){&& a[n][0]=k;&& a[n][1]=l;& cin&&k&&l;&&}&for(k=0;k&n;k++){&&flag=1;&&for(l=2;l&a[k][1];l++){&&if(isPrime(l)&&a[k][0]%l==0){&&&printf("BAD %dn",l);&&&flag=0;&&&&&}&&}&&if(flag) printf("GOODn");&}&return 0;}
哇啊啊 感激不尽啊 能帮我翻译下嘛
我看不懂要求哦
输入不超过20组数字,每一组由k和l组成如果k的最小素数不比l小,输出GOOG否则输出BAD和这个最小素数& 注:素数也叫质数
||||点击排行}

我要回帖

更多关于 plc编程入门 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信