摘要:
public class PascalTriangle { public static void main(String[] args) { int[][] pascalTriangle = new int[10][]; // 赋值 for (int i = 0; i < pascalTriangl 阅读全文
摘要:
public class PascalTriangle { public static void main(String[] args) { int[][] pascalTriangle = new int[10][]; // 赋值 for (int i = 0; i < pascalTriangl 阅读全文
摘要:
public static void main(String[] args) { for (int i = 2; i <= 100; i++) { boolean flag = true; for (int j = 2; j < i; j++) { if (i % j == 0) { flag = 阅读全文
摘要:
// Node类/** * 蛇身,由一个个节点组成,将每个节点抽象为一个类 */public class Node { private int nodeX; private int nodeY; public Node(int nodeX, int nodeY) { this.nodeX = nod 阅读全文
摘要:
public class PerfectNumberTest { public static void main(String[] args) { // 1K以内完数因子之和 for (int i = 0; i < 1000; i++) { int perfectNumber = 0; // 重置 阅读全文