A simple algorithm problem, ask the master to answer!

Updated on technology 2024-04-15
15 answers
  1. Anonymous users2024-02-07

    You can try it on VB, and a few results come out to indicate that it has been run a few times.

  2. Anonymous users2024-02-06

    Take one as an example: for i 1 to n

    end is executed n times.

    Every time it is executed. for j←1 to n

    The same goes for end.

    Again each time.

    for k←1 to j

    x←x+1end

    Note that each cycle j is varied.

  3. Anonymous users2024-02-05

    There are only loops, and there are no termination conditions ......That's an infinite number of ......Are you sure this is an algorithm that can go to a specific step? It doesn't seem complete.

    The three questions are obviously of the same type.

    How is it possible to find a specific value?

    Or am I too ignorant......I don't understand.

  4. Anonymous users2024-02-04

    1) The values of i j k are:

    1 1 1 @语句执行第1次.

    1 2 1 @语句执行第2次.

    1 2 2 @语句执行第3次.

    1 3 1 @语句执行第4次.

    1 3 2 @语句执行第5次.

    1 3 3 @语句执行第6次.

    n n n @语句执行第n*(1+2+3....)n) times.

    2) The values of i j k are:

    1 1 1 @语句执行第1次.

    2 1 1 @语句执行第2次.

    2 2 1 @语句执行第3次.

    2 2 2 @语句执行第4次.

    3 1 1 @语句执行第5次.

    3 2 1 @语句执行第6次.

    3 2 2 @语句执行第7次.

    n n n @语句执行第1+(1+2)+(1+2+3+(1+2...)n) times.

    3) Similar to question 2, but the value is more complicated, and I can't really summarize the formula for the result for a while.

    1 1 1 1 ..1 @语句执行第1次.

    2 1 1 1 ..1 @语句执行第2次.

    2 2 1 1 ..1 @语句执行第3次.

    2 2 2 1...1 @语句执行第4此.

    2 2 2 2...1 @语句执行第5次.

    n n n n ..n

  5. Anonymous users2024-02-03

    The result is 100

    The explanation is as follows: let k be an integer, then k and k+1 are even and odd, then kok+1)=(k+k+1+1) 2=k+1 then 1o2=2, 2o3=3, and so on!

  6. Anonymous users2024-02-02

    Because n represents the size of the problem that can be handled, for the same amount of operations (running for 100 consecutive days), the larger n represents the problem being processed.

    The second type of time complexity is not strong enough to deal with the problem at the current scale of the operation.

    In the following question, when judging the complexity of time, only look at the highest degree of polynomial.

    That's 4n 34+......then only the highest number of times n 34 is considered.

  7. Anonymous users2024-02-01

    I don't know much about the first question, I haven't been to an undergraduate, and the second question is mainly based on the index, which one is the highest choice and which is the level of time complexity, and the constant term is meaningless no matter what.

  8. Anonymous users2024-01-31

    The result is 100

    The explanation is as follows: if k is an integer, then k and k+1 are even and odd, then k o (k+1)=(k+k+1+1) 2=k+1

    Then 1o2 = 2, 2o3 = 3, and so on!

  9. Anonymous users2024-01-30

    Take two people once each as a round, in each round, two people take a maximum of 1 2 3 (pieces), if there are only these 3 balls, if you want to win, you must ensure that the last take, that is, the sum of the number of balls taken by the first person is a multiple of 3, for example, the first person takes one, you take two, if the first person takes two, you take one.

    Now there are 25 balls, 25 8 3 2, so if you want to win, you have to take two balls first, and then if the other one takes one or two, you take two or one, so you must win.

  10. Anonymous users2024-01-29

    If k is not equal to i, then the values of a[i] and a[k] are exchanged: temp=a[i]; Put the value of a[i] into a temporary variable a[i]=a[k]; a[k] gives a[i]a[k]=temp; temp, i.e. the original a[i] to a[k].

    k=i;It turns out that k is equal to i

    for(j=i+1;j<8;j++)

    if(a[k]>a[j])k=j;After the comparison, if there is a[j] less than a[k]=a[i], then k=j, it is not equal to i.

  11. Anonymous users2024-01-28

    Proof using definition: Proof 2n=o(n2).

    What is this? Is it written wrong?,Why did you suddenly come to an n2.

  12. Anonymous users2024-01-27

    Step 1: 21 3 = 7 Calculate that a bear wearing a doctor's hat is equal to 7. Step 2:

    19-7 2=6 calculates that a car carrying a bear without a doctor's hat is equal to 6Step 3: 15-6-7=2 Calculate that a doctor's cap is equal to 2

    The last step is very critical, the pit is in the last step, the first bear without a doctor's hat is 7-2=5, the two doctor's hats are 2+2=4, and the last car without a bear is 6-5=1The final answer is 5+4 1=9A perfect ending.

  13. Anonymous users2024-01-26

    According to the puzzle, the equation is 5+4 1=9.

  14. Anonymous users2024-01-25

    I've also found a variety of claims on the Internet, so let me tell you about my findings. The license plate number is actually a mathematical problem, and when it comes to mathematics, we must talk about Zhou Yi, because Zhou Yi is the most fundamental principle of these mathematics. I saw on the Internet that the numbers were added separately and then subtracted from 81, and I was tempted to say that this is simply nonsense.

    The mathematical principle of 81 of Zhou Yi lies in the fact that 81 is a cycle, and the number 81 is a regression number in Zhou Yi, and its principle is the same as 1, so when calculating mathematics, only 80 needs to be used, and a number, after you split it, is it still the original number? It seems that those who say that the numbers are split and added do not understand Chinese culture at all, Chinese culture emphasizes a whole, and the number after the split is no longer a whole. Some of them also say that the number is divided by 80, and then the number divided is removed by the whole number, and then the remaining decimal point is multiplied by 80, and the number obtained is a mathematical number.

    I didn't verify this algorithm one by one, I only tried a few, but the result is the same as the correct one, but it doesn't understand the law of the Chinese Yi culture regroup, and I will talk about the correct method later. Another part says to use the number to remove 80, and then use its number to calculate whether it is a decimal or not, I don't know what they are counting. I don't understand the truth of the cycle at all.

    A cycle from 1 to 81 is formed, why do decimals appear? There is also a saying that only 4 digits are used, I think, is a number missing or the original number? In general, after China has experienced a different history, the essence of Chinese Yi culture is no longer in the mainland, but in Hong Kong, Taiwan and Japan, after the 80s, the earliest mathematics and physics were also transmitted from Japan, Hong Kong and Taiwan, and they followed the principle of the 81 cycle, let me talk about this principle.

    In the Book of Changes, 1 to 81 is regarded as a cycle, a complete circle, in mathematics, 1 and 81 are the same result, so, the number greater than 80, let it carry out the cycle it can carry out to the end, and finally the number less than 80 is its real mathematics, this is the correct algorithm, a number, complete its cycle, so as not to destroy its original, so the correct way to calculate mathematics is to use the number to calculate mathematics to remove 80, and the remainder is the final mathematical number. For example, the number 788 is divided by 80 to get 9, and the remainder is 68, and the mathematical logic of this number is 68. It means that it completes 9 cycles, and the remaining number 68 is its essence.

    In China, Chinese characters are developed together with Zhou Yi, so names can be used to calculate mathematics, and the numbers of Chinese characters are Chinese characters, while English letters are foreign objects, which are generally not used as calculated quantities, and English numbers are only used for partitioning, not real mathematics, such as D304, which can be regarded as the number 304 in D area, and 304 is the number. The principle is simply here, as for the good and bad code table, there is not much difference, the problem is mainly focused on the problem of calculating mathematical numbers.

  15. Anonymous users2024-01-24

    Removing the $100,000 real estate investment (according to the title, it should be assumed that there is no return on cash investment), so only $10,000 was spent on her 65 and 80 years of money for 15 years to invest and make an income.

    Then, find the intrinsic rate of return IRR (on the other hand, the necessary rate of return you want).

    325000-100000 = 75000 (P a, IRR, 15) and 225000 75000 = 3

    Therefore, looking up the table, it can be seen that under the condition of 15 years, the IRR is 30% ( 35% ( .

    Hope it helps.

Related questions
10 answers2024-04-15

Do you know the story of selling cats?

An antique dealer took a fancy to the cat-feeding saucer of a cat seller and found it to be a valuable antique porcelain. >>>More

18 answers2024-04-15

Float with a broken position! Let's take an easy standard off-drift as a demonstration, the trail that goes downhill at the high speed in town: >>>More

16 answers2024-04-15

You're not a junior, but you're a spare tire, a spare tire that will be abandoned after six years. >>>More

21 answers2024-04-15

Amitabha! Senior brother has some truth! If I can really let go of my attachment completely, since I realize that there is no self, then there is no one to oppose me, no one to oppose me, and all the bad habits such as greed, hatred, ignorance, and suspicion cannot be established. >>>More

7 answers2024-04-15

DNA is more easily degraded than RNA, not because of its large molecular weight, but because DNA is double-stranded, which is held together by two single-stranded hydrogen bonds between bases. RNA is single-stranded, and to degrade RNA, it is necessary to break the phosphodiester bond, which is a covalent bond. Breaking hydrogen bonds is easier than breaking covalent bonds, so DNA is easily degraded. >>>More