Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aniketwithpython/10-digit-number
Code for solution
https://github.com/aniketwithpython/10-digit-number
rust
Last synced: 8 days ago
JSON representation
Code for solution
- Host: GitHub
- URL: https://github.com/aniketwithpython/10-digit-number
- Owner: AniketWithPython
- Created: 2024-07-12T10:37:27.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T16:30:11.000Z (4 months ago)
- Last Synced: 2024-07-13T12:24:01.737Z (4 months ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 10-digit-number
## Problem
The Problem statement goes as follows:Find a 10 digit number such that
The first digit gives the number of zeros in the number
The second digit gives the number of ones in the number
The third digit gives the number of twos in the number
The fourth digit gives the number of threes in the number
The fifth digit gives the number of fours in the number
The sixth digit gives the number of fives in the number
The seventh digit gives the number of sixes in the number
The eighth digit gives the number of sevens in the number
The ninth digit gives the number of eights in the number
The tenth digit gives the number of nines in the number
## Rust solution
This solution uses a brute-force approach and parallelism to achieve the result*. Parallelism is achieved using [rayon](https://docs.rs/rayon/latest/rayon/).## Answer
```
6210001000
```> ©Aniket Maity 2024
> \* Performance may vary depending on system.