Gradabase
Time limit3sMemory limit128 MB
Add one to every grade and print only students remaining in grades 1 to 6 for each case.
- Level
Easy1 of 10
- Topics
- Implementation, Array
- Solved
- No attempts yet
Problem
The school year is over at Hunt Valley Elementary. Everyone passed, so everyone moves up one grade and the database has to be updated. Kindergarten is stored as 0, first grade as 1, and so on. Hunt Valley Elementary teaches kindergarten through sixth grade. Print the new grade level only for the students who are still at Hunt Valley Elementary.
Input
The first line contains , the number of test cases. Each case starts with , the number of entries in that case, followed by integers between 0 and 6, each on its own line. There are 1 to 500 test cases with 1 to 500 students per case.
Output
For each case, print the line Case x: on a line of its own, where is the case number. Then print the updated grade levels, each on a new line. Every printed value is between 1 and 6. A student who has graduated from the school is not printed.