Masala #XSOSZBH6RQ
Teskari^2
Agar sonni 2 marta teskari tartibda joylashtirganda yana sonning o'zi hosil bo'lsa bu son yaxshi son hisoblanadi.
Masalan:
123 soni yaxshi son, chunki teskari(123) → 321, teskari(321) → 123.
Ammo 3400 yaxshi son emas chunki teskari(3400) = 43, teksari(43) → 34.
Kirish faylida \(10000\) dan oshmaydigan bitta nomanfiy son beriladi.
Chiqish faylida agar o'sha son yaxshi bo'lsa \(1\) aks holda \(0\) ni chop eting.
# | input.txt | output.txt |
---|---|---|
1 |
54 |
1 |
2 |
8670000 |
0 |