generate final contest data and write stat total  code number