Sum of Two Numbers
면접 대비시간 제한1초메모리 제한1024 MB
각 n을 자릿수의 합 차이가 1 이하가 되도록 음이 아닌 두 정수 x와 y로 나눈다.
문제
The sum of digits of a non-negative integer is the result of summing up its digits together when written in the decimal system. For example, the sum of digits of is and the sum of digits of is .
In a formal way, the sum of digits of , where , is defined as .
Given an integer , find two non-negative integers and which satisfy the following conditions.
- , and
- The sum of digits of and the sum of digits of differ by at most .
It can be shown that such and always exist.
입력
Each test contains multiple test cases. The first line contains the number of test cases ().
Each test case consists of a single integer ()
출력
For each test case, print two integers and .
If there are multiple answers, print any.