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

Method main

src/class143/Code01_Elevator.java:107–121  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

105 }
106
107 public static void main(String[] args) throws IOException {
108 Kattio io = new Kattio();
109 h = io.nextLong() - 1;
110 x = io.nextInt();
111 y = io.nextInt();
112 z = io.nextInt();
113 prepare();
114 for (int i = 0; i < x; i++) {
115 addEdge(i, (i + y) % x, y);
116 addEdge(i, (i + z) % x, z);
117 }
118 io.println(compute());
119 io.flush();
120 io.close();
121 }
122
123 // Kattio类IO效率很好,但还是不如StreamTokenizer
124 // 只有StreamTokenizer无法正确处理时,才考虑使用这个类

Callers

nothing calls this directly

Calls 8

nextLongMethod · 0.95
nextIntMethod · 0.95
prepareMethod · 0.95
addEdgeMethod · 0.95
computeMethod · 0.95
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected