Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

New puzzle: Find a number with a number of 4s and 7s that has only 4s and 7s #9

Description

defsat(d: int):
""" Find a number bigger than n whose decimal representation has k 4's and 7's where k's decimal representation consists only of 4's and 7's Inspired by [Codeforces Problem 110 A](https://codeforces.com/problemset/problem/110/A) """returnd>123456789andset(str(str(d).count("4") +str(d).count("7"))) <= {"4", "7"}

Solvers, post your solutions in the comments using the following formatting:

<details><summary>Reveal solution</summary>
```python
def sol():
return "world" # replace with your solution
```
</details>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions