#299

LeetCode:Bulls and Cows

那年仲夏 提交于 2020-03-02 00:05:44
1、题目名称 Bulls and Cows(猜数字游戏) 2、题目地址 https://leetcode.com/problems/bulls-and-cows/ 3、题目内容 英文:You are playing the following Bulls and Cows game with your friend: You write a 4-digit secret number and ask your friend to guess it, each time your friend guesses a number, you give a hint, the hint tells your friend how many digits are in the correct positions (called "bulls") and how many digits are in the wrong positions (called "cows"), your friend will use those hints to find out the secret number. 中文:假设你正在玩猜数字游戏(Bulls and Cows):你写出4个数字让你的朋友猜,每次你的朋友猜一个数字,你给出一条线索,这个线索告诉你的朋友,有多少个数字位置是正确的(被称为Bulls)