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