2017年4月25日

用提高效率的暴力法求3000以内的素数

摘要: public class At { public static void main(String[] args) { int haha; for(int i=2;i<=3000;i++) { haha=0; for(int j=2;j<Math.sqrt(i);j++)//关键 ... 阅读全文

posted @ 2017-04-25 02:09 我是蒟蒻 阅读(132) 评论(0) 推荐(0) 编辑

用模重复平方法求b^n mod m

摘要: package 模重复平方法;import java.math.BigInteger;import java.util.Scanner;/* * 要求: * 1编程实现模重复平方计算法 */public class Ah { public static void main(String[] args... 阅读全文

posted @ 2017-04-25 02:00 我是蒟蒻 阅读(380) 评论(0) 推荐(0) 编辑

导航