func CalculateAPowXModN(a, x, n int) int {
	var result int = 1
	for i := 0; i < x; i++ {
		result = (result * a) % n
	}
	return result
}
// CalculateAPowXModN calculates a^x (mod n)

CalculateAPowXModN calculates a^x (mod n)
// CalculateAPowXModN calculates a^x ( mod n )
func CalculateAPowXModN(a, x, n int) int {
	var result int = 1
	for i := 0; i < x; i++ {
		result = (result * a) % n
	}
	return result
}
func CalculateAPowXModN ( a , x , n int ) int { var result int = 1 for i := 0 ; i < x ; i ++ { result = ( result * a ) % n } return result }
CalculateAPowXModN calculates a^x (mod n)
CalculateAPowXModN calculates a^x ( mod n )