#Lutece1439. Today is a Rainy Day

Today is a Rainy Day

Migrated from Lutece 1439 BeiJing Onsite Problem C

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

现有两个等长的串 s 和 t,长度不超过110,两串字符都只含有{1, 2, 3, 4, 5, 6}

现有两种操作:1. 将t的一个字符变为另一个字符;2. 将t的一种字符全部变为另一种字符。注意变换后的字符也只能属于字符集{1, 2, 3, 4, 5, 6}

现在给出100组case,每组给出两个串s, t,现问,可不断用上述两种操作,t 需最少多少步可以变为 s ?

Input

最多100组case

每组给出两行字符串s, t,1 <= |s|, |t| <= 110,|s| = |t|,s, t 都只含有 {1, 2, 3, 4, 5, 6}.

Output

对于每组数据,输出一行答案,表示最少步数,使得 t 变为 s

Samples

22345611
12345611
2234562221
1234561221
2234562211
1234561111
22345622112
12345611111
654321654321654321654321
123456123456123456123456
1
2
3
3
11

Resource

The 2015 ACM-ICPC Asia Beijing Regional Contest