feat: improved digit calc
This commit is contained in:
parent
ae66fc5a37
commit
3b531d11c5
1 changed files with 1 additions and 1 deletions
2
main.cpp
2
main.cpp
|
@ -28,8 +28,8 @@ int main()
|
|||
// TODO: remove static_cast
|
||||
int input_length = static_cast<int>(std::to_string(input).length());
|
||||
int first_digit = input % 10;
|
||||
int middle_digit = ((input % 100) - first_digit) / 10;
|
||||
int last_two_digits = input % 100;
|
||||
int middle_digit = ((last_two_digits) - first_digit) / 10;
|
||||
|
||||
vector<string> result;
|
||||
string suffix = "";
|
||||
|
|
Loading…
Reference in a new issue