Find the Students Who Didn't Submit
InterviewTime limit1sMemory limit128 MB
Given 28 distinct attendance numbers from 1 to 30, print the two missing numbers in increasing order.
- Level
Easy1 of 10
- Topics
- Array, Implementation
- Solved
- No attempts yet
Problem
Professor M at University X teaches a programming course. There are 30 students in the class, and the roster assigns each student an attendance number from 1 to 30.
Of the 30 students, 28 submitted the professor's special assignment. Write a program that finds the attendance numbers of the 2 students who did not submit.
Input
Across 28 lines, the attendance numbers of the 28 students who submitted the assignment are given, one per line. Each attendance number satisfies , and no number is repeated.
Output
Print two lines. On the first line, print the smaller of the two attendance numbers of the students who did not submit; on the second line, print the larger one.