• I think it depends on whether the list is odd or even in length. Actually, that's probably not true. With one, it'll probably always get it down there, but if I've made it just equal to two I might have lost.

    是奇数还是偶数,事实上,这是不正确的,如果最后剩下一个,那可能得到了结果,如果剩下两个,可能错了,所以,首先我们要格外。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • 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是奇数那么就不会得到,原来的值,因此我看看得到的值,和原来的值相等不相等就可以了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • If x was even, x divided by two is going to be actually the half of x, right?

    如果x是偶数的话,x除以2当然,就等于x的一半了,对不对?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • It says, in either case in general, t of b-- and this is where I'm going to abuse notation a little bit but I can basically bound it by t, 12 steps plus t of b over 2.

    我可以用一个,比12+t的数代表,这里有点不准确的地方,具体的步数依赖于奇数偶数,但是你们可以看到在两个case中。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • I didn't just make it one smaller, I made it a half smaller. That's a nice deal.OK.

    我把它的规模减半了,这太棒了,好,但是我不会直接处理b是偶数这种情况的。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • It's going to print out even or odd, depending on whether the value I put in, which is x in this case, is even or odd.

    它会打印奇数或者偶数,这取决于我输入的值,也就是这个例子中的x,是奇数还是偶数

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Remember last time, we wrote this simple piece of code to print out even or odd. If, you know, x, it was in fact, even or odd. So let me show you what a flow chart for that would look like, because I want to make a comparison point here.

    记得上节课我们写过的,那个显示奇数还是偶数的程序么,如果,你知道,x,实际上是奇数还是偶数,那么让我来为大家画个这个程序的流程图吧,因为我这里想为大家做个比较。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • On the next step though, this, we get substituted by that. Right, on the next step, I'm back in the even case, it's going to take six more steps, plus t of b minus 1. Oops, sorry about that, over 2.

    这一步就是偶数了,这一步会让我们得到,6+t这样的结果,因为b-1现在是偶数了,别忽略这里的细节。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Here's another way I could do that.

    如果b是偶数的话,a的b次方。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定