list_node * remove_value(list_node * head, int num)
{
    //////在下面完成代码
    while(head->val == num) head = head->next;
    list_node* cur = head;
    while(cur->next != nullptr) {
        if(cur->next->val == num) {
            cur->next = cur->next->next;
        } else cur = cur->next;
    }
    return head;
}