#include <stdio.h>
#define N 10
int func(int a, int b)
{
if ((a ^ b) < 0)
return 0;
do
a /= 10, b /= 10;
while (a & b);
return (a == b);
}
int main()
{
int a[][2] =
{
{ 110, 119},
{ -110, -119},
{ -110, 119},
{ 1234, 214},
{ 567, 23},
{ 567, -23}
};
for (int i = 0; i < 6; ++i)
printf("%5d, %5d -> %c\n", a
[i
][0], a
[i
][1], func
(a
[i
][0], a
[i
][1]) ? 'T' : 'F'); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgTiAxMAppbnQgZnVuYyhpbnQgYSwgaW50IGIpCnsKICAgIGlmICgoYSBeIGIpIDwgMCkKICAgICAgICByZXR1cm4gMDsKICAgIGRvCiAgICAgICAgYSAvPSAxMCwgYiAvPSAxMDsKICAgIHdoaWxlIChhICYgYik7CiAgICByZXR1cm4gKGEgPT0gYik7Cn0KaW50IG1haW4oKQp7CiAgICBpbnQgYVtdWzJdID0KICAgIHsKICAgICAgICB7IDExMCwgMTE5fSwKICAgICAgICB7IC0xMTAsIC0xMTl9LAogICAgICAgIHsgLTExMCwgMTE5fSwKICAgICAgICB7IDEyMzQsIDIxNH0sCiAgICAgICAgeyA1NjcsIDIzfSwKICAgICAgICB7IDU2NywgLTIzfQogICAgfTsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgNjsgKytpKQogICAgICAgIHByaW50ZigiJTVkLCAlNWQgLT4gJWNcbiIsIGFbaV1bMF0sIGFbaV1bMV0sIGZ1bmMoYVtpXVswXSwgYVtpXVsxXSkgPyAnVCcgOiAnRicpOwogICAgcmV0dXJuIDA7Cn0K