30 pupils in years 7 to 11 each created at least one maths problem, making 40 maths problems altogether. Every possible pair of pupils in the same year created the same number of problems. Every possible pair of pupils in different years created a different number of problems. How many pupils created exactly one problem?