#P14495. [NCPC 2025] Arithmetic Adaptation
[NCPC 2025] Arithmetic Adaptation
题目背景
:::align{center}

Postcard showing a Norwegian by solving Sample 3. Coloured black and white photo, National Library of Norway. :::
题目描述
Practice does make perfect! You have finally achieved proficiency at the task of adding two small nonzero integers and to compute their sum . Before you move on to studying four-digit numbers, you want to achieve mastery by also understanding the inverse problem: given integer , determine nonzero and such that . None of the numbers may use more than digits.
输入格式
The input consists of:
- One line with an integer such that .
输出格式
Output two integers (with and ) and (with and ) such that . If there is more than one valid solution, you may output any one of them.
10
3 7
-1
-2 1
3
1 2
0
-999 999
提示
Explanation of Sample Input 1
On input , the output is correct because . Note that many other outputs would also be correct, such as , , or even . On the other hand, the answer would be (because ), and so would (because both and must be nonzero) and (because both and must have at most three digits.)
京公网安备 11011102002149号