Skip to content

Instantly share code, notes, and snippets.

@przadka
Created February 1, 2025 15:38
Show Gist options
  • Select an option

  • Save przadka/d8a10d4da2cb2bc9bfeee7dfd33e9691 to your computer and use it in GitHub Desktop.

Select an option

Save przadka/d8a10d4da2cb2bc9bfeee7dfd33e9691 to your computer and use it in GitHub Desktop.
4o-two-dates
<USER>
### 1. Two Dates
Mateusz has 12 cards with digits:
`0 0 1 1 2 2 3 3 4 4 5 5`
and he arranges them to form dates. The first date of 2025 that he can create using two cards to form the day number, two other cards to form the month number, and four other cards to form the year number will be January 13:
`1 3 0 1 2 0 2 5`
**What will be the last date in 2025 that Mateusz can create using eight of these twelve cards?**
<ASSISTANT>
To find the **last date in 2025** that Mateusz can create using the given cards, let's proceed systematically:
### 1. **Constraints:**
- Use exactly **8 cards**: 2 for the **day (DD)**, 2 for the **month (MM)**, and 4 for the **year (2025)**.
- The available digits: `0 0 1 1 2 2 3 3 4 4 5 5`.
- The year is fixed as **2025**, which requires the digits `2 0 2 5`.
After using these four digits, we are left with: `0, 1, 1, 3, 3, 4, 4, 5`.
### 2. **Strategy:**
We want the **latest date**, so we should:
- Choose the **largest possible month** (December = 12).
- Within that month, choose the **largest possible day**.
### 3. **Can We Form December (12)?**
- December = `1` and `2`.
- Yes, we have `1` and `2` left after using `2 0 2 5`.
### 4. **Forming the Largest Day in December:**
Available digits after `1` and `2` are: `0, 1, 3, 3, 4, 4, 5`.
We aim for the largest day ≤ 31:
- **31:** Requires `3` and `1` — both available. ✅
### **Conclusion:**
The latest date Mateusz can form is **31 December 2025**, using:
- **Day:** `3 1`
- **Month:** `1 2`
- **Year:** `2 0 2 5`
**Final Answer:** **31 December 2025** ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment