
Pascal Бабу Ягу пригласили на должность директора фирмы. В первый день к ней пригласили двух
курьеров. Каждый последующий день количество курьеров устраивалось. Баба яга согласилась когда прислали на менее 500 курьеров . Сколько курьеров было прислано в 2,3,4,..n день. На какой день баба яга согласилась.

Ответы на вопрос

var i,d,s:longint;
begin
s:=2;d:=2;i:=1;
while(s <500) do
begin
i:=i+1;
d:=3*d;
s:=s+d;
if(i mod 2 =0)then writeln( i,' тый день ', d);
end;
writeln(s);
end.



Pascal's Dilemma: The Tale of Baba Yaga and the Couriers
Baba Yaga was invited to take on the role of director at a firm. On the first day, two couriers were sent to her. Each subsequent day, the number of couriers sent was determined. Baba Yaga agreed to take on the role when fewer than 500 couriers were sent. We need to determine the number of couriers sent on the 2nd, 3rd, 4th, and so on, days, as well as on which day Baba Yaga agreed to take on the role.
Calculating the Number of Couriers and the Day Baba Yaga Agreed
To determine the number of couriers sent on each day and the day Baba Yaga agreed to take on the role, we can use a simple calculation. Since the number of couriers sent on each day is not specified, we can use a hypothetical approach to solve the problem.
Let's assume that on the second day, 2^2 couriers were sent, on the third day, 2^3 couriers were sent, and so on. We can calculate the number of couriers sent on each day using the formula 2^(n-1), where n represents the day number.
- On the 2nd day: 2^(2-1) = 2 couriers were sent. - On the 3rd day: 2^(3-1) = 4 couriers were sent. - On the 4th day: 2^(4-1) = 8 couriers were sent.
We can continue this pattern to find the number of couriers sent on each subsequent day.
Day Baba Yaga Agreed
To find the day on which Baba Yaga agreed to take on the role, we need to determine the day when the number of couriers sent was less than 500. Using the pattern we established earlier, we can calculate the number of couriers sent on each day until we find the day when the number is less than 500.
Conclusion
Based on the hypothetical pattern, we have calculated the number of couriers sent on the 2nd, 3rd, and 4th days. We can continue this pattern to find the number of couriers sent on subsequent days. Additionally, we can determine the day on which Baba Yaga agreed to take on the role by finding the day when the number of couriers sent was less than 500.


Топ вопросов за вчера в категории Информатика








Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili