All pastes #934372 Raw Edit

adr

public text v1 · immutable
·published 2008-03-08 20:10 UTC
rendered paste body
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BigInteger num = new BigInteger("9");
		long start = System.currentTimeMillis();
		BigInteger powered = num.pow(387420489);
		long end = System.currentTimeMillis();
		long result = end - start;
		System.out.println("Calculation time: " + (result));
		try {
			FileWriter wr = new FileWriter("c:/adr.txt");
			wr.write("Result = " + powered.toString() + "\n\nCalculation time: "
					+ Long.toString(result) + " ms.");
			wr.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}