标有"@"的句子的时间 [英] The times of the sentence labelled with '@'

查看:115
本文介绍了标有"@"的句子的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有世俗的循环句子.
请给出标有"@"的句子的时间:

There is sevelal loop sentences.
Please give out the times of the sentences labelled with ''@'':

(1) i=1; k=0;
   while ( i<=n-1) {
    @ k += 10 * i;
      i++;
   }
 (2) i=1; k=0;
   do {
    @ k +=10 * i;
      i++;
   } while(i<=n-1); 
 (3) i = 1; k = 0;
   while (i<=n-1) { 
      i++ ;
     @ k+= 10 * i;
   }
 (4) k=0;
   for( i=1; i<=n; i++) {
    for (j=i ; j<=n; j++)
     @ k++;
   }
 (5) for( i=1; i<=n; i++) { 
    for (j=1; j<=i; j++) {
     for (k=1; k<=j; k++)
      @ x += delta;
    }
   }
 (6) i=1; j=0;
   while (i+j<=n) {
    @ if (i>j ) j++ ;
      else i++ ;
   }
 (7) x=n; y=0; // n 是不小于1的常数
   while (x>=(y+1)*(y+1)) {
   @ y++;
   }
 (8) x=91; y=100;
   while (y>0 ) {
   @ if (x>100 ) { x -= 10; y- -; } 
     else x++;
   }

推荐答案

好,您的问题是什么?
:)

Ok, and what is your problem about?
:)

JanTCode写道:
JanTCode wrote:

我想知道在给定n时由"@"标记的语句的执行时间

I want to know the executing times of the sentence labled by ''@'' when n is gived


我认为您至少有两个选择:

  • 计数.
  • 开发一个代表您计数的程序.

  • I think you''ve at least two options:

    • Count.
    • Develop a program for counting on your behalf.

    • 我想知道执行时间给出n时,由"@"标记的句子的第一个
      I want to know the executing times of the sentence labled by ''@'' when n is gived


      这篇关于标有"@"的句子的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆