Actually this is some higher level concept called Green's Theorem. But as of now, a B.Sc. student is not supposed to know this concept (you will learn this in M.Sc.), But there are...
here is the solution.. potential at the center when potential is given at the surfaces= (sum of product of potential and area of surface)/(sum of area of all surfaces)... try to re...