There was an error while loading. Please reload this page.
1 parent 530af12 commit cf8316eCopy full SHA for cf8316e
hanjiwon1/week1/1051.py
@@ -0,0 +1,12 @@
1
+n, m = map(int, input().split())
2
+rect = [input() for _ in range(n)]
3
+size = 1
4
+
5
+for i in range(n):
6
+for j in range(m):
7
+for k in range(j + 1, m):
8
+if (rect[i][j] == rect[i][k] and k-j < n - i):
9
+if (rect[i+(k-j)][k] == rect[i][j] and rect[i+(k-j)][j] == rect[i][j]):
10
+if (size < k - j + 1):
11
+size = k - j + 1
12
+print(size**2)
hanjiwon1/week1/4796.py
@@ -0,0 +1,11 @@
+import sys
+i = 0
+while True:
+i += 1
+l, p, v = map(int, sys.stdin.readline().split())
+if (l == 0 and p == 0 and v == 0):
+break
+d = (v // p) * l
+d += (v % p) if l > (v % p) else l
+print(f'Case {i}: {d}')
0 commit comments