#include <iostream>
void task1()
{
std::cout << "TASK_1\n";
for (int i = 1001; i <= 1025; i += 3)
std::cout << i << " ";
std::cout << "\n\n";
}
void task2()
std::cout << "task_2\n";
unsigned n;
std::cout << "n: ";
std::cin >> n;
for (int i = 0; i < n; ++i)
std::cout << "Silence is golden\n";
std::cout << "\n";
void task3()
std::cout << "task_3\n";
int sum = 0;
for (int i = 10; i <= 88; ++i)
sum += i;
std::cout << sum << "\n\n";
void task4()
std::cout << "task_4\n";
for (int i = 100; i >= 1; i -= 4)
std::cout << "3 2 1\n\n";
int main()
task1();
task2();
task3();
task4();
ответ:
n, m, t = map(int,
x = list(map(int,
def build(name):
if name in built:
pass
elif b[a.index(name)] == ["0"]:
built.append(name)
else:
for i in b[a.index(: ]:
if i not in built:
build(i)
a = []
b = []
built = []
for i in range(0, n):
a.append(
b.append(
for i in range(0, b.:
built.append(a[b.
a.pop(b.
b.pop(b.
[build(str(o)) for o in x]
print(len(built))
объяснение:
#include <iostream>
void task1()
{
std::cout << "TASK_1\n";
for (int i = 1001; i <= 1025; i += 3)
std::cout << i << " ";
std::cout << "\n\n";
}
void task2()
{
std::cout << "task_2\n";
unsigned n;
std::cout << "n: ";
std::cin >> n;
for (int i = 0; i < n; ++i)
std::cout << "Silence is golden\n";
std::cout << "\n";
}
void task3()
{
std::cout << "task_3\n";
int sum = 0;
for (int i = 10; i <= 88; ++i)
sum += i;
std::cout << sum << "\n\n";
}
void task4()
{
std::cout << "task_4\n";
for (int i = 100; i >= 1; i -= 4)
std::cout << i << " ";
std::cout << "3 2 1\n\n";
}
int main()
{
task1();
task2();
task3();
task4();
}
ответ:
n, m, t = map(int,
x = list(map(int,
def build(name):
if name in built:
pass
elif b[a.index(name)] == ["0"]:
built.append(name)
else:
for i in b[a.index(: ]:
if i not in built:
build(i)
built.append(name)
a = []
b = []
built = []
for i in range(0, n):
a.append(
b.append(
for i in range(0, b.:
built.append(a[b.
a.pop(b.
b.pop(b.
[build(str(o)) for o in x]
print(len(built))
объяснение: