From a41aa05396f8cb83289f8b95a267dd062f6a9484 Mon Sep 17 00:00:00 2001 From: NSDepression <179435306+NSDepression@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:02:54 +0530 Subject: Day 2.2 oops --- Day 2/Untitled.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 Day 2/Untitled.py (limited to 'Day 2/Untitled.py') diff --git a/Day 2/Untitled.py b/Day 2/Untitled.py deleted file mode 100644 index 536e83b..0000000 --- a/Day 2/Untitled.py +++ /dev/null @@ -1,21 +0,0 @@ - - -with open ('input.txt', "r") as file: - content = file.read().strip() -range_groups = content.split(',') -st = [] -sum = 0 - -for group in range_groups: - print (f"Range: {group}") - distinct_nums = group.split("-") - first_value = int(distinct_nums[0]) - last_value = int(distinct_nums[1]) - for num in range(first_value, last_value + 1): - s = str(num) - is_repeating = s in (s + s) [1:-1] - if is_repeating==True: - st.append(num) -for n in st: - sum += n -print (f"Total Sum: {sum} ") \ No newline at end of file -- cgit v1.2.3