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

Method main

src/class131/Code03_CornField.java:52–68  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

50 }
51
52 public static void main(String[] args) throws IOException {
53 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
54 StreamTokenizer in = new StreamTokenizer(br);
55 PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
56 in.nextToken();
57 n = (int) in.nval;
58 in.nextToken();
59 k = (int) in.nval;
60 for (int i = 1; i <= n; i++) {
61 in.nextToken();
62 arr[i] = (int) in.nval;
63 }
64 out.println(compute());
65 out.flush();
66 out.close();
67 br.close();
68 }
69
70 public static int compute() {
71 // 注意这里第二层for循环,j一定是从k~0的枚举

Callers

nothing calls this directly

Calls 4

computeMethod · 0.95
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected