Could I check the number? Is it 8488****?
我可以核对一下电话号码吗?是不是8488****?
Could I check the number? Is it 2211-334?
我可以核对一下电话号码吗?是不是2211 - 3344 ?
Could I check the number, is this 010-110?
我能确认一下电话号码吗,请问是010 - 110吗?
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.
它将给我返回头的总数,知道了这些之后我可以说好了,有多少猪呢,无论有多少组鸡的数目,我只要用总数减去那个值,之后我就可以知道一共有多少条腿,然后再把这个值和题目中的腿数相比较,看它是否等于一开始的腿数,啊!真有趣,有一个返回值。
In either case, I take that value and multiply back by two, if it was even I get back the original number, if it was odd, I'm not going to get back the original number, so I can just check to see if they're the same.
在两种情况中,我都把结果值,再乘以2,如果x是偶数我就,得到了原来的值,如果x是奇数那么就不会得到,原来的值,因此我看看得到的值,和原来的值相等不相等就可以了。
So I'm going to check to see if- really can't read that thing, let me do it this way-- right, I'm going to increase the number of compares, and I'm going to check to say, is the thing I'm looking for at the i'th spot in the list?
让我们这样做吧-好-,我会去增加比较次数的计数器,然后去看看在第i处的元素,是不是我要找的呢?,这里s的意思就是,给定数组的?
应用推荐