Skip to content

Instantly share code, notes, and snippets.

@hamadu
Created April 11, 2014 06:08
Show Gist options
  • Save hamadu/10443324 to your computer and use it in GitHub Desktop.
Save hamadu/10443324 to your computer and use it in GitHub Desktop.
Benchmark
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
static final long MOD = 1000000007;
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt();
long hoge = 1;
for (int i = 0 ; i < n ; i++) {
hoge *= 1000000009;
hoge %= MOD;
}
out.println(hoge);
out.flush();
}
public static void debug(Object... o) {
System.err.println(Arrays.deepToString(o));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment