Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please write in java You enjoy your new job as a teacher of young children. Its fun to see them learning to count, recognize letters,

Please write in java

You enjoy your new job as a teacher of young children. Its fun to see them learning to count, recognize letters, draw, and interact with the world.

One common problem youve noticed is that children often forget numbers when counting. For example, early on they might count one, two, three, five, six. You have to remind them about that four that they didnt say. And as they get more proficient and clever, they may use the quick way of counting: one, two, skip a few, ninety-nine, one hundred!

Please write a program that can help you (and your students) identify the missing numbers when they are counting.

Input

The first line of input contains a single integer , where 1100. Each of the next lines contains one number that the child recited. Each recited number is an integer between 1 and 200 (inclusive). They are listed in increasing order, and there are no duplicates.

Output

If the child recited all the numbers between 1 and the last number they recited, then print good job.

If the child missed any numbers between 1 and the last number they recited, then print those missing numbers in increasing numeric order, one per line.

Sample Input 1 Sample Output 1
9 2 4 5 7 8 9 10 11 13 
1 3 6 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions