阅读下面的程序,其时间复杂度为_________?1. int index =...009. index=index+2;
举一反三
- ResultSet的方法getDouble(int index)、getString(int index)和getInt(int index)获取index列的值,index的值是从1开始。( )
- 阅读下面一段程序: words = "Hello,Python" index = words.index("Py", 0,6) print(index) 运行程序,最终执行的结果为()
- score是一个整数数组,有五个元素,已经正确初始化并赋值,仔细阅读下面代码,程序运行结果是() temp = score[0]; for (int index = 1;index < 5;index++) { if (score[index] < temp) { temp = score[index]; } }
- 下面类的索引定义或使用正确的是()。 A: class MyClass{ int x; int y; public int this[int index] { get{ if (index==0) return x; else return y; }}} B: class MyClass{ int x; int y; public int this[int index] { set{ if (index==0) x=value; else y=value; }}} C: class MyClass{ int x; int y; public int INDEX[int index] { get{ if (index==0) return x; else return y; } set{ if (index==0) x=value; else y=value; }}} D: class MyClass{ int x; int y; public int this[int index] { get{ if (index==0) return x; else return y; } set{ if (index==0) x=value; else y=value; }}}
- 当输入为 ‘cbabc’ 时,下列程序的输出结果为?s1 = raw_input() index = 0 s2 = '' while index [ len(s1) - 1: if s1[index] ] s1[index + 1]: s2 += s1[index] else: s2 = s2 * 2 index += 1 print s2