about summary refs log tree commit diff
path: root/codechef/rsigns.c
blob: 248e1234cb942c49588ab7d0f8397b1576a87091 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>

long long mewtwo(long k)
{
	if (!k)
		return 1;

	long long p = mewtwo(k >> 1);
	return p * p * (k % 2 + 1) % 1000000007;
}

int main()
{
	int t;
	long k;

	scanf("%d", &t);
	while (t--) {
		scanf("%ld", &k);
		printf("%lld\n", mewtwo(k) * 5 % 1000000007);
	}

	return 0;
}