There are two things that this problem asks us to do.
For this, we need to be able to convert between strings and numbers. The following is a list of conversion functions supported in each language. Refer to each language's reference document for details.
Language | String > Number | Number > String |
---|---|---|
C | sscanf | sprintf |
C++ | stringstream , stoi | stringstream , stoi |
Python | int | str |
Java | Integer.parseInt | String.format |
Rust | i32::parse() | format! |
Javascript | + , - | + , `` |