시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1003 766 718 76.874%

문제

해밍 거리란 두 숫자의 서로 다른 자리수의 개수이다. 두 이진수가 주어졌을 때, 해밍 거리를 계산하는 프로그램을 작성하시오.

입력

입력을 여러 개의 테스트 케이스로 이루어져 있다. 첫째 줄에는 테스트 케이스의 개수 T가 주어진다. 각 테스트 케이스는 두 줄로 이루어져 있다. 각 줄에는 이진수가 하나씩 주어진다. 두 이진수는 길이가 서로 같고, 100자리를 넘지 않는다.

출력

각 테스트 케이스에 대해서, 해밍 거리를 계산한 뒤, "Hamming distance is X."라고 출력한다. X는 해밍 거리이다.

예제 입력 1

4
0
1
000
000
1111111100000000
0000000011111111
101
000

예제 출력 1

Hamming distance is 1.
Hamming distance is 0.
Hamming distance is 16.
Hamming distance is 2.
W3sicHJvYmxlbV9pZCI6IjM0NDkiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQ1NzRcdWJjMGQgXHVhYzcwXHViOWFjIiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWQ1NzRcdWJjMGQgXHVhYzcwXHViOWFjXHViNzgwIFx1YjQ1MCBcdWMyMmJcdWM3OTBcdWM3NTggXHVjMTFjXHViODVjIFx1YjJlNFx1Yjk3OCBcdWM3OTBcdWI5YWNcdWMyMThcdWM3NTggXHVhYzFjXHVjMjE4XHVjNzc0XHViMmU0LiBcdWI0NTAgXHVjNzc0XHVjOWM0XHVjMjE4XHVhYzAwIFx1YzhmY1x1YzViNFx1Yzg0Y1x1Yzc0NCBcdWI1NGMsIFx1ZDU3NFx1YmMwZCBcdWFjNzBcdWI5YWNcdWI5N2MgXHVhY2M0XHVjMGIwXHVkNTU4XHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWM3OTFcdWMxMzFcdWQ1NThcdWMyZGNcdWM2MjQuPFwvcD5cclxuIiwiaW5wdXQiOiI8cD5cclxuXHRcdWM3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