Logo
(追記) (追記ここまで)

16018번 - Occupy parking 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB56048945488.327%

문제

You supervise a small parking lot which has N parking spaces.

Yesterday, you recorded which parking spaces were occupied by cars and which were empty.

Today, you recorded the same information.

How many of the parking spaces were occupied both yesterday and today?

입력

The first line of input contains the integer N (1 ≤ N ≤ 100). The second and third lines of input contain N characters each. The second line of input records the information about yesterday’s parking spaces, and the third line of input records the information about today’s parking spaces. Each of these 2N characters will either be C to indicate an occupied space or . to indicate it was an empty parking space.

출력

Output the number of parking spaces which were occupied yesterday and today.

제한

예제 입력 1

5
CC..C
.CC..

예제 출력 1

1

Only the second parking space from the left was occupied yesterday and today.

예제 입력 2

7
CCCCCCC
C.C.C.C

예제 출력 2

4

The first, third, fifth, and seventh parking spaces were occupied yesterday and today.

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2018 > CCC 2018 Junior Division 2번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /