MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / main

Method main

src/class041/Code03_SameMod.java:54–81  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

52 }
53
54 public static void main(String[] args) {
55 System.out.println("测试开始");
56 int testTime = 100000;
57 int mod = 1000000007;
58 for (int i = 0; i < testTime; i++) {
59 long a = random();
60 long b = random();
61 long c = random();
62 long d = random();
63 if (f1(a, b, c, d, mod) != f2(a, b, c, d, mod)) {
64 System.out.println("出错了!");
65 }
66 }
67 System.out.println("测试结束");
68
69 System.out.println("===");
70 long a = random();
71 long b = random();
72 long c = random();
73 long d = random();
74 System.out.println("a : " + a);
75 System.out.println("b : " + b);
76 System.out.println("c : " + c);
77 System.out.println("d : " + d);
78 System.out.println("===");
79 System.out.println("f1 : " + f1(a, b, c, d, mod));
80 System.out.println("f2 : " + f2(a, b, c, d, mod));
81 }
82
83}

Callers

nothing calls this directly

Calls 4

randomMethod · 0.95
f1Method · 0.95
f2Method · 0.95
printlnMethod · 0.45

Tested by

no test coverage detected