fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. private static final long MOD = 1000000007;
  5.  
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8. long t = scanner.nextLong();
  9. for (long i = 0; i < t; i++) {
  10. long x = scanner.nextLong();
  11. long y = scanner.nextLong();
  12. long result = (1L << x) | (1L << y);
  13. System.out.println(result % MOD);
  14. }
  15. }
  16. }
  17.  
Success #stdin #stdout 0.13s 37052KB
stdin
3
4 3
5 0
15 30
stdout
24
33
73774585