From 90966746c93c5b4fcc2a9cdbb4d048842c2c2d51 Mon Sep 17 00:00:00 2001 From: hangyeol Date: Thu, 19 Jun 2025 22:37:45 +0900 Subject: [PATCH 1/2] =?UTF-8?q?124=EC=B0=A8=201=EB=B2=88=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=ED=92=80=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\353\260\261\355\225\234\352\262\260.py" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "live12/test124/\353\254\270\354\240\2341/\353\260\261\355\225\234\352\262\260.py" diff --git "a/live12/test124/\353\254\270\354\240\2341/\353\260\261\355\225\234\352\262\260.py" "b/live12/test124/\353\254\270\354\240\2341/\353\260\261\355\225\234\352\262\260.py" new file mode 100644 index 00000000..5da35469 --- /dev/null +++ "b/live12/test124/\353\254\270\354\240\2341/\353\260\261\355\225\234\352\262\260.py" @@ -0,0 +1,29 @@ +import sys + +def main(): + input = sys.stdin.readline + S = input().strip() + P = input().strip() + + Slen = len(S) + Plen = len(P) + i = 0 + count = 0 + + while i < Plen: + maxLen = 0 + + for j in range(len(S)): + k = 0 + while i + k < Plen and j + k < Slen and P[i + k] == S[j + k]: + k += 1 + maxLen = max(maxLen, k) + + i += maxLen + count += 1 + + print(count) + + +if __name__ == '__main__': + main() \ No newline at end of file From 1418fe4e4b4ac50234f56d470b51cee8df871c1a Mon Sep 17 00:00:00 2001 From: hangyeol Date: Thu, 19 Jun 2025 22:38:28 +0900 Subject: [PATCH 2/2] =?UTF-8?q?124=EC=B0=A8=202=EB=B2=88=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=ED=92=80=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\353\260\261\355\225\234\352\262\260.py" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "live12/test124/\353\254\270\354\240\2342/\353\260\261\355\225\234\352\262\260.py" diff --git "a/live12/test124/\353\254\270\354\240\2342/\353\260\261\355\225\234\352\262\260.py" "b/live12/test124/\353\254\270\354\240\2342/\353\260\261\355\225\234\352\262\260.py" new file mode 100644 index 00000000..23df2a55 --- /dev/null +++ "b/live12/test124/\353\254\270\354\240\2342/\353\260\261\355\225\234\352\262\260.py" @@ -0,0 +1,18 @@ +import sys + +def main(): + input = sys.stdin.readline + + N = int(input()) + + result = [] + + def dfs(num): + result.append(num) + last_digit = num % 10 + for i in range(last_digit): + dfs(num * 10 + i) + + +if __name__ == '__main__': + main() \ No newline at end of file