We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec7b5b2 + ae587d7 commit f581e7eCopy full SHA for f581e7e
Hourglass
@@ -0,0 +1,25 @@
1
+#!/bin/python3
2
+
3
+import math
4
+import os
5
+import random
6
+import re
7
+import sys
8
9
10
11
+if __name__ == '__main__':
12
+ arr = []
13
14
+ for _ in range(6):
15
+ arr.append(list(map(int, input().rstrip().split())))
16
+ maximum = -9 * 7
17
18
+ for i in range(6):
19
+ for j in range(6):
20
+ if j + 2 < 6 and i + 2 < 6:
21
+ result = arr[i][j] + arr[i][j + 1] + arr[i][j + 2] + arr[i + 1][j + 1] + arr[i + 2][j] + arr[i + 2][j + 1] + arr[i + 2][j + 2]
22
+ if result > maximum:
23
+ maximum = result
24
25
+ print(maximum)
0 commit comments