My solution to the problem of HQC exam