From 0f843a2f79e2505ec9b89f8673af3fe6802c4e0b Mon Sep 17 00:00:00 2001 From: rimogsu Date: Tue, 27 Oct 2026 22:40:55 +0900 Subject: [PATCH 1/2] 4070 --- a.py | 2 ++ .../3613. Minimize Maximum Component Cost.py" | 0 .... Minimum Rotations to Dial a Number I.py" | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 a.py create mode 100644 "leetcode3/\353\263\200\354\247\200\355\230\221/v3/3613. Minimize Maximum Component Cost.py" create mode 100644 "leetcode3/\353\263\200\354\247\200\355\230\221/v3/4070. Minimum Rotations to Dial a Number I.py" diff --git a/a.py b/a.py new file mode 100644 index 000000000..b72105ebe --- /dev/null +++ b/a.py @@ -0,0 +1,2 @@ +a = 70000 * 40000 +print(a) \ No newline at end of file diff --git "a/leetcode3/\353\263\200\354\247\200\355\230\221/v3/3613. Minimize Maximum Component Cost.py" "b/leetcode3/\353\263\200\354\247\200\355\230\221/v3/3613. Minimize Maximum Component Cost.py" new file mode 100644 index 000000000..e69de29bb diff --git "a/leetcode3/\353\263\200\354\247\200\355\230\221/v3/4070. Minimum Rotations to Dial a Number I.py" "b/leetcode3/\353\263\200\354\247\200\355\230\221/v3/4070. Minimum Rotations to Dial a Number I.py" new file mode 100644 index 000000000..7440d512a --- /dev/null +++ "b/leetcode3/\353\263\200\354\247\200\355\230\221/v3/4070. Minimum Rotations to Dial a Number I.py" @@ -0,0 +1,23 @@ +class Solution: + def minRotations(self, s: str) -> int: + dic = { + 0: {0:0,1:1,2:2,3:3,4:4,5:5,6:4,7:3,8:2,9:1}, + 1: {1:0,2:1,3:2,4:3,5:4,6:5,7:4,8:3,9:2,0:1}, + 2: {2:0,3:1,4:2,5:3,6:4,7:5,8:4,9:3,0:2,1:1}, + 3: {3:0,4:1,5:2,6:3,7:4,8:5,9:4,0:3,1:2,2:1}, + 4: {4:0,5:1,6:2,7:3,8:4,9:5,0:4,1:3,2:2,3:1}, + 5: {5:0,6:1,7:2,8:3,9:4,0:5,1:4,2:3,3:2,4:1}, + 6: {6:0,7:1,8:2,9:3,0:4,1:5,2:4,3:3,4:2,5:1}, + 7: {7:0,8:1,9:2,0:3,1:4,2:5,3:4,4:3,5:2,6:1}, + 8: {8:0,9:1,0:2,1:3,2:4,3:5,4:4,5:3,6:2,7:1}, + 9: {9:0,0:1,1:2,2:3,3:4,4:5,5:4,6:3,7:2,8:1}, + } + + ans = 0 + curr = 0 + + for i in s: + ans += dic[curr][int(i)] + curr = int(i) + + return ans \ No newline at end of file From 292acce8b96c06ff1c74411af8cf7c38a3ba66c9 Mon Sep 17 00:00:00 2001 From: rimogsu Date: Tue, 27 Oct 2026 22:41:31 +0900 Subject: [PATCH 2/2] a.py delete --- a.py | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 a.py diff --git a/a.py b/a.py deleted file mode 100644 index b72105ebe..000000000 --- a/a.py +++ /dev/null @@ -1,2 +0,0 @@ -a = 70000 * 40000 -print(a) \ No newline at end of file