FindRect/Beka00
FindRect/aberezniker
t1"""t1battlefield = [input()]
2------------
3.###.....#..
4.###.##..#..
5.....##.....
6.....##..#..
7............
8............
9.####..####.
10.......####.
11.......####.
12------------
13"""
14area = [input()]
15area.append(input())2battlefield.append(input())
16while area[-1][0] != '-':3while battlefield[-1][0] != '-':
17    area.append(input())4    battlefield.append(input())
18r = len(area)5row = len(battlefield)
19c = len(area[0])6col = len(battlefield[0])
20square = 07number_of_ships = 0
21for i in range(1, r - 1):8for i in range(1, row - 1):
22    for j in range(1, c - 1):9    for j in range(1, col - 1):
23        if area[i][j] == '#' and area[i - 1][j] != '#' and (area[i][j - 1] != '#'):10        if battlefield[i][j] == '#' and battlefield[i - 1][j] != '#' and (battlefield[i][j - 1] != '#'):
24            square += 111            number_of_ships += 1
25print(square)12print(number_of_ships)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op