Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake Binary #29

Open
freedom5566 opened this issue May 2, 2018 · 0 comments
Open

Fake Binary #29

freedom5566 opened this issue May 2, 2018 · 0 comments

Comments

@freedom5566
Copy link

freedom5566 commented May 2, 2018

來源:https://www.codewars.com/kata/fake-binary

題目:

Given a string of digits, you should replace any digit below 5 with '0' and any digit 5 and above with '1'. Return the resulting string.

給一個字串,你要用0替換5以下的任何數字,用1替換5以上的任何數字,最後回傳字串。

P.S:5以下不包括5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant