Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca76feb

Browse files
Add 375_New-Number+1 to DAILY
1 parent e38acb2 commit ca76feb

File tree

1 file changed

+15
-0
lines changed
  • DailyProgrammer/Attempting/375_New-Number+1

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Challenge #364 [Easy]: [New Number+1](https://www.reddit.com/r/dailyprogrammer/comments/aphavc/20190211_challenge_375_easy_print_a_new_number_by/)
2+
3+
#### Date: 18-Feb-2019
4+
5+
#### Attempting: 19-Feb-2019
6+
7+
## Description
8+
9+
A number is input in computer then a new no should get printed by adding one to each of its digit. If you encounter a 9, insert a 10 (don't carry over, just shift things around).
10+
11+
For example, 998 becomes 10109.
12+
13+
## Bonus
14+
15+
This challenge is trivial to do if you map it to a string to iterate over the input, operate, and then cast it back. Instead, try doing it without casting it as a string at any point, keep it numeric (int, float if you need it) only.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /