subject

Doi prieteni se afla pe axa Ox, in puncte cu coordonate întregi. Primul se află în punctul x1 = a, iar al doilea se află în punctul x2 = b. Fiecare se poate mișca cu o poziție, la stânga sau la dreapta, de un număr nelimitat de ori. Când se mișcă, oboseala se modifică după următoarea regulă: la prima mișcare oboseala crește cu 1, la a doua mișcare oboseala crește cu 2, la a treia cu 3 și asa mai departe. De exemplu, dacă un prieten se mișcă mai întâi la stânga, apoi la dreapta, și apoi iar la stânga, oboseala lui devine 1 + 2 + 3 = 6. Prietenii vor să se întâlnească într-un punct cu coordonata număr întreg. Aflați oboseala totală minimă pe care cei doi cei doi o vor acumula.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
You know the right answer?
Doi prieteni se afla pe axa Ox, in puncte cu coordonate întregi. Primul se află în punctul x1 = a, i...
Questions
question
Health, 30.11.2021 21:40
question
Mathematics, 30.11.2021 21:40
question
Mathematics, 30.11.2021 21:40
question
Mathematics, 30.11.2021 21:40
Questions on the website: 13722363