|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||256 MB||5||5||5||100.000%|
There are N lamps in a row at a long hallway. The lamps are numbered from 1 to N. Each lamps has a state of either off or on. There is a special mechanism to change the states of the lamps. In an operation, we can do one of the followings:
Current states of the lamps are represented by a string A of length N. The i-th (1 ≤ i ≤ N) character of A is 0 if the lamp i is off, and 1 if on. We want to make the states of the lamps to be those represented by a string B of length N, with as few operations as possible. The i-th (1 ≤ i ≤ N) character of B is 0 if we want to make the lamp i off, and 1 if on.
Write a program which, given the number of lamps, the current states and the target states, calculates the minimum number of operations needed to achieve the target states
Read the following data from the standard input.
N A B
Write one line to the standard output. The output should contain the minimum number of operations needed to achieve the target states.
8 11011100 01101001
In this sample input, we can achieve the target states in 4 operations, for example as follows:
Since it is impossible to achieve the target states in less than 4 operations, output 4
13 1010010010100 0000111001011
18 001100010010000110 110110001000100101