我有四只鸡和五只鸭。
去年冬天我再去到那里的时候,他们有一个单独的大房子来养几十只鸡。
Last winter when I went here again, they had a big separate house to raise dozens of chicken.
就说我吧,如果我也点了几道有辣酱的菜,像麻婆豆腐或口水鸡,我总是会再要一碗米饭的。
I, for one, always get rice if I'm also ordering dishes bathed in a spicy sauce, like mapo tofu or mouth-watering chicken.
You could say, I could have zero chickens and 20 pigs, does that work? I've got one chicken and nineteen pigs, does that work?
为什么简单列举出所有可能的情况,再一个来检验?你可能会说,我可以有0只鸡和20只猪,这能行吗?
I've got two chickens and eighteen pigs, you get the idea.
我有1只鸡和19只猪,这能行吗?,我有2只鸡和18只猪。
Knowing that, I'm going to say, OK, how many pigs are there, well that's just how we're, however many I had total, minus that amount, and then I can see, how many legs does that give, and then I can check, that the number of legs that I would get for that solution, is it even equal to the number of legs I started with, ah! Interesting. A return.
它将给我返回头的总数,知道了这些之后我可以说好了,有多少猪呢,无论有多少组鸡的数目,我只要用总数减去那个值,之后我就可以知道一共有多少条腿,然后再把这个值和题目中的腿数相比较,看它是否等于一开始的腿数,啊!真有趣,有一个返回值。
应用推荐