Skip to content

считалочка#1

Open
dfdf11-cpu wants to merge 3 commits intomainfrom
chitalochka
Open

считалочка#1
dfdf11-cpu wants to merge 3 commits intomainfrom
chitalochka

Conversation

@dfdf11-cpu
Copy link
Owner

в файле chitalochka.c написан код, который с помощью циклического списка вычисляет, какой из n воинов останется последним, если убивать m-го воина.

@dfdf11-cpu dfdf11-cpu requested a review from chernishev October 26, 2025 19:30
struct warrior* next;
} warrior;

int circle(int n, int m) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше отдельно выделить функции для работы с циклическим списком (создание списка, добавление элемента, удаление элемента) и отдельно -- решение задачи.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants