В общем, есть поезд. Он закольцован. Ты просыпаешься в одном из вагонов. Все вагоны имеют одинаковый интерьер, сквозь окна ничего не видно. Ты можешь только включать или выключать свет в вагоне, никакие другие действия не разрешены. Задача: сосчитать количество вагонов в поезде. Ну, и, конечно же, свет в вагонах когда ты просыпаешься включен или выключен случайным образом
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": 1, | |
| "exportedAt": "2026-05-01T01:08:35.713925", | |
| "profile": { | |
| "id": "wendor_default", | |
| "name": "Wendor (default)", | |
| "isDefault": false, | |
| "readonly": false, | |
| "settings": { | |
| "socksPort": 10808, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| BadRequestException, | |
| Body, | |
| Controller, | |
| Delete, | |
| Get, | |
| Param, | |
| Post, | |
| Put, | |
| } from '@nestjs/common'; |