LCP 1. 猜数字

int game(int* guess, int guessSize, int* answer, int answerSize){
    if (guess == NULL || answer == NULL)
        return 0;
    int res = 0;
    for (int i = 0; i < guessSize; i++)
        if (guess[i] == answer[i])
            res ++;
    return res;
}

  

posted on 2020-02-03 11:24  luckygxf  阅读(138)  评论(0编辑  收藏  举报

导航