cswork / OA打开练习工作台

Hudson River TradingOA #1

Integer to String Without Built-ins

估计简单可在线判题

考点(AI 标注)字符串位运算

Implement conversion from an integer to a decimal string without using built-in number-to-string functions. Output one line for each signed 32-bit integer in the input; negative numbers keep the minus sign, and 0 is output as 0.

The upstream original problem forbids a built-in conversion helper; this site's judge can only verify the output and cannot statically prove that a contestant did not call a built-in conversion function.

输入格式

Each line contains one signed 32-bit integer; there are 1..100000 lines. The last line of input may or may not end with a newline.

输出格式

Output one line with the decimal representation of each input integer.

样例 1

输入:

0
42
-17
2147483647
-2147483648

输出:

0
42
-17
2147483647
-2147483648

样例 2

输入:

0

输出:

0

样例 3

输入:

-1000000000
1000000000

输出:

-1000000000
1000000000