IntermediateRating 1200
Bulls and Cows
Compare a guess with the secret (same length, digits). Bulls are digits in the right place. Cows are digits that appear in the secret but in a different place (each secret digit is matched at most once). Print xAyB, where x is bulls and y is cows.
Input
The secret, then the guess.
Output
A string like 1A3B.
Sample 1
Input
1807 7810
Output
1A3B
Sample 2
Input
1123 0111
Output
1A1B
Output appears here