eventually c++ does not provide any optimized pow(int,int) function, so here you go :) (should also fix Timothy's troubles)