public static void pn(Object... l1) { for (int i = 0; i < l1.length; i++) { if (i != 0) out.print(' '); out.print(l1[i].toString()); } out.println(); }
public static void pn(Collection l1) { boolean first = true; for (Object e : l1) { if (first) first = false; else out.print(' '); out.print(e.toString()); } out.println(); }
boolean solve2() { int t = nextInt(); if (t == 0) return false; int n = nextInt(); Tower[] towers = new Tower[t]; for (int i = 0; i < t; i++) { towers[i] = new Tower(new Point(nextInt(), nextInt()), nextInt()); } n++; Point[] p = new Point[n]; for (int i = 0; i < n; i++) { p[i] = new Point(nextInt(), nextInt()); } // System.err.println(Arrays.toString(p)); ArrayList<Point> points = new ArrayList<Point>(); double r = 1; for (int i = 0; i < n - 1; i++) { double dist = p[i].dist(p[i + 1]) - (1 - r); int e = (int) Math.floor(dist + 1 - EPS); Point v = p[i + 1].subtract(p[i]).norm(); for (int j = 0; j < e; j++) { points.add(p[i].add(v.multiply(j).add(v.multiply(1 - r)))); } r = p[i + 1].dist(points.get(points.size() - 1)); } if (p[n - 1].dist(points.get(points.size() - 1)) > 0.5 - EPS) { points.add(p[n - 1]); } // System.err.println(points); char last = 0; ArrayList<String> ans = new ArrayList<String>(); for (int i = 0; i < points.size(); i++) { double maxP = Integer.MIN_VALUE; char here = 0; for (int j = 0; j < t; j++) { double w = towers[j].get(points.get(i)); if (maxP < w - EPS) { maxP = w; here = (char) (j + 'A'); } } if (here != last) { ans.add("(" + i + "," + here + ")"); } last = here; } for (int i = 0; i < ans.size(); i++) { if (i != 0) out.print(" "); out.print(ans.get(i)); } out.println(); return true; }
public static void main(String[] args) { PrintWriter pw; Scanner sc; try { sc = new Scanner(new File("input.txt")); BigInteger a, b, c; a = sc.nextBigInteger(); b = sc.nextBigInteger(); c = a.divide(b); // System.out.println(firstTeam+" "+secondTeam); pw = new PrintWriter(new File("output.txt")); pw.print(c); pw.close(); } catch (IOException e) { } }
public void print(Object... objects) { for (int i = 0; i < objects.length; i++) { if (i != 0) writer.print(' '); writer.print(objects[i]); } }