Masala #0419
Sonni top
Dastur 3 xonali \(\overline{abc}\) son o’yladi va o’ylagan sonini raqamlari testkari tartibda yozib oldi \(\overline{cba}\) hosil bo’lgan sondi dastur o’ylagan sondan ayirib modulini oldi ya’ni \(\overline{xyz} = |\overline{abc} - \overline{cba}|\). Endi dastur \(X = \overline{xyz} + \overline{zyx}\)yig’indini hisoblab bo’lgach sizga \(X\) sonini aytadi siz dastur dastlab qanday son o’ylagan ekanligini topishingiz kerak.
Kirish fayilida yagona X butun soni berilgan.
Chiqish fayilida dastur dastlab o’ylagan sondi chop eting agar bunday yechimlar bir nechta bo’lsa eng kichigini chop eting.
# | input.txt | output.txt |
---|---|---|
1 |
1089 |
103 |