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

Method main

src/class139/Code02_Pagodas.java:26–49  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

24 }
25
26 public static void main(String[] args) throws IOException {
27 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
28 StreamTokenizer in = new StreamTokenizer(br);
29 PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
30 in.nextToken();
31 int cases = (int) in.nval;
32 for (int t = 1, n, a, b; t <= cases; t++) {
33 in.nextToken();
34 n = (int) in.nval;
35 in.nextToken();
36 a = (int) in.nval;
37 in.nextToken();
38 b = (int) in.nval;
39 out.print("Case #" + t + ": ");
40 if (((n / gcd(a, b)) & 1) == 1) {
41 out.println("Yuwgna");
42 } else {
43 out.println("Iaka");
44 }
45 }
46 out.flush();
47 out.close();
48 br.close();
49 }
50
51}

Callers

nothing calls this directly

Calls 5

gcdMethod · 0.95
printMethod · 0.45
printlnMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected