From 881957f4f0865000ab978222c9cb694c73180995 Mon Sep 17 00:00:00 2001 From: NSDepression Date: Wed, 3 Dec 2025 11:56:18 +0530 Subject: Day 2.2 --- Day 2/Day_02 | Bin 0 -> 66440 bytes Day 2/Day_02.dSYM/Contents/Info.plist | 20 +++++++++++++ Day 2/Day_02.dSYM/Contents/Resources/DWARF/Day_02 | Bin 0 -> 1532260 bytes .../Resources/Relocations/aarch64/Day_02.yml | 5 ++++ Day 2/Day_02.swift | 31 +++++++++++++++------ Day 2/Untitled.py | 21 ++++++++++++++ 6 files changed, 69 insertions(+), 8 deletions(-) create mode 100755 Day 2/Day_02 create mode 100644 Day 2/Day_02.dSYM/Contents/Info.plist create mode 100644 Day 2/Day_02.dSYM/Contents/Resources/DWARF/Day_02 create mode 100644 Day 2/Day_02.dSYM/Contents/Resources/Relocations/aarch64/Day_02.yml create mode 100644 Day 2/Untitled.py (limited to 'Day 2') diff --git a/Day 2/Day_02 b/Day 2/Day_02 new file mode 100755 index 0000000..5ce52d3 Binary files /dev/null and b/Day 2/Day_02 differ diff --git a/Day 2/Day_02.dSYM/Contents/Info.plist b/Day 2/Day_02.dSYM/Contents/Info.plist new file mode 100644 index 0000000..4906cc6 --- /dev/null +++ b/Day 2/Day_02.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Day_02 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Day 2/Day_02.dSYM/Contents/Resources/DWARF/Day_02 b/Day 2/Day_02.dSYM/Contents/Resources/DWARF/Day_02 new file mode 100644 index 0000000..643e85e Binary files /dev/null and b/Day 2/Day_02.dSYM/Contents/Resources/DWARF/Day_02 differ diff --git a/Day 2/Day_02.dSYM/Contents/Resources/Relocations/aarch64/Day_02.yml b/Day 2/Day_02.dSYM/Contents/Resources/Relocations/aarch64/Day_02.yml new file mode 100644 index 0000000..241796a --- /dev/null +++ b/Day 2/Day_02.dSYM/Contents/Resources/Relocations/aarch64/Day_02.yml @@ -0,0 +1,5 @@ +--- +triple: 'arm64-apple-darwin' +binary-path: Day_02 +relocations: [] +... diff --git a/Day 2/Day_02.swift b/Day 2/Day_02.swift index 6d682bd..dc991d6 100644 --- a/Day 2/Day_02.swift +++ b/Day 2/Day_02.swift @@ -37,7 +37,7 @@ print("=======Part 1=======\n\(invalidIdSum)") invalidIdSum = 0 func isRepeating(_ x: Int) -> Bool { - if x == 0 { return false } + if x < 10 { return false } var digits = 0 var temp = x while temp > 0 { @@ -48,19 +48,16 @@ func isRepeating(_ x: Int) -> Bool { for period in 1...(digits / 2) { guard digits % period == 0 else { continue } var divisor = 1 - for _ in 0..