Practice · 5 of 6
Final 5: The Lucky Tickets
CHALLENGE
Difficulty: advanced+25 XP
**Bài toán.** Count the integers x with 1 ≤ x ≤ N whose decimal digit sum is divisible by 7. **Constraints:** 1 ≤ N < 10^18 (up to 18 digits). **Input:** one line: N. **Output:** one integer — the count (fits in 64 bits).
Press Submit to check your solution.
Back to lesson: Practice: The Final Pack