From 9092c8b8bb5d056c75515a3fa487a8380f9ee2c5 Mon Sep 17 00:00:00 2001 From: Vanya Voykova <72099128+VanyaVoykova@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:10:30 +0300 Subject: [PATCH] Update special-numbers.md --- .../special-numbers/special-numbers.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Content/Chapter-7-2-complex-loops-exam-problems/special-numbers/special-numbers.md b/Content/Chapter-7-2-complex-loops-exam-problems/special-numbers/special-numbers.md index 6f98b952a..7e388f7fe 100644 --- a/Content/Chapter-7-2-complex-loops-exam-problems/special-numbers/special-numbers.md +++ b/Content/Chapter-7-2-complex-loops-exam-problems/special-numbers/special-numbers.md @@ -1,19 +1,19 @@ # Problem: Special Numbers -Write a program that **reads one integer number N** and generates all possible **special numbers** from **1111** to **9999**. To be considered **special**, a number must correspond to the **following condition**: -- **N to be divisible by each of its digits without reminder**. +Write a program that **reads an integer N** and generates all possible **special numbers** from **1111** to **9999**. To be considered **special**, a number must satisfy the **following condition**: +- **N must be divisible by each of its digits without remainder**. -**Example:** upon **N = 16, 2418** is a special number: -- 16 / 2 = 8 **without reminder** -- 16 / 4 = 4 **without reminder** -- 16 / 1 = 16 **without reminder** -- 16 / 8 = 2 **without reminder** +**Example:** if **N = 16, 2418** is a special number: +- 16 / 2 = 8 **without remainder** +- 16 / 4 = 4 **without remainder** +- 16 / 1 = 16 **without remainder** +- 16 / 8 = 2 **without remainder** -## Input Data +## Input The input is read from the console and consists of **one integer** within the range **[1 … 600 000]**. -## Output Data +## Output Print on the console **all special numbers**, separated by **space**. @@ -21,7 +21,7 @@ Print on the console **all special numbers**, separated by **space**. |Input|Output|Comments| |---|---|---| -|3|1111 1113 1131 1133 1311 1313 1331 1333 3111 3113 3131 3133 3311 3313 3331 3333|3 / 1 = 3 without reminder
3 / 3 = 1 without reminder
3 / 3 = 1 without reminder
3 / 3 = 1 without reminder| +|3|1111 1113 1131 1133 1311 1313 1331 1333 3111 3113 3131 3133 3311 3313 3331 3333|3 / 1 = 3 without remainder
3 / 3 = 1 without remainder
3 / 3 = 1 without remainder
3 / 3 = 1 without remainder| |Input|Output|Input|Output| |---|---|---|---| @@ -29,7 +29,7 @@ Print on the console **all special numbers**, separated by **space**. ## Hints and Guidelines -Solve the problem by yourself using what you learned from the previous two problems. Keep in mind the difference between operators for **integer division `/`** and **division with reminder `%`** in C#. +Solve the problem on your own using what you have learned from the previous two problems. Keep in mind the difference between operators for **integer division `/`** and **division with remainder `%`** in C#. ## Testing in the Judge System