Hey <

Following is my worked solution :

(a)

List it out:

1 - 9 = 9 numbers = 9 digits

10 - 30 = 21 numbers

21 × 2 = 42 digits

Total digits = 9 + 42 = **51**

(b)

Apply the knowledge of Factors and/or Multiples to solve this.

Start by listing it out and analyze the pattern.

For multiple of 2 (every 2 pupils):

Seated: ALL Even

Stand: ALL Odd

For multiple of 3 (every 3 pupils):

Even Stand: 6, 12, 18, 24

Odd Seated: 3, 9, 15, 21, 27

For multiple of 4 (every 4 pupils):

Even Stand: 6, 18, 4, 8, 16, 20, 28

Odd Seated: 3, 9, 15, 21, 27

For multiple of 5 (every 5 pupils):

Even Stand: 6, 18, 4, 8, 16, 28, 10, 30

Odd Seated: 3, 9, 21, 27, 5, 25

For multiple of 6 (every 6 pupils):

Even Stand: 4, 8, 16, 28, 10, 12, 24

Odd Seated: 3, 9, 21, 27, 5, 25

Based on the pattern,

1 is always standing;

Look at 12. It was first seated (after 2), stand (after 3), seated again (after 4).

12 is multiple of itself (12), 2, 3, 4, 6. And its factors are 1, 2, 3, 4, 6, 12.

This infers that a number that has an even number of factors will be seated.

Conversely speaking, a number that has an odd number of factors will be standing.

Take a look at 4. Factors of 4 are 1, 2, 4. So pupil 4 will be standing in the end.

From 1 to 30, identify those numbers that have an odd number of factors.

These are ....

1, 4, 9, 16, 25.

Hence **5 pupils** were standing in the end.

=======

Trust this helps.

Do let me know again if there's further clarification.

Cheers,

Edward