-
Notifications
You must be signed in to change notification settings - Fork 17
Cpp chapter 14 #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Cpp chapter 14 #285
Conversation
| . {.task_hint} | ||
| ```cpp {.task_answer} | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так и должно быть? Подсказка я так понимаю на фронте обязательна к наличию в тексте главы?
а в ответе может стоит числа привести?
|
|
||
| Какой тип подойдет для его хранения больше всего? {.task_text} | ||
|
|
||
| Диапазон беззнакового целого — от `0` до `2^N − 1` включительно, где `N` — ширина типа в битах. {.task_text} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
кажется это должен быть хинт.
| } | ||
| ``` | ||
| Для положительных чисел переполнение возникает, если выполняется условие`a > std::numeric_limits<int>::max() - b`. Для отрицательных переполнение возникает, если выполняется условие`a < std::numeric_limits<int>::min() - b`. Достаточно проверять на знак только число `b`. {.task_hint} | ||
| ```cpp {.task_answer} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
на всякий еще раз отмечу, но это какая системная история, видимо так и должно быть:
тут пусто)
| ```cpp {.task_answer} | ||
| ``` | ||
|
|
||
| В реализации компилятора у нас на площадке переполнение знакового типа обрабатывается так же, как и беззнакового: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мне кажется однажды это будет не так, если конечно на платформе не зафризился компилятор раз и на веки вечные.
Я бы это оформил в виде задачи, мол проверьте че там в плейграунде у нас сегодня.
No description provided.