30. The number of students studying in the V-VI grades of the school is expressed as a three-digit number. From the digits of this number (without repeating them), 6 different two-digit numbers can be formed, the sum of which is twice the number of students in the V-VI grades. How many students are there in these grades?
30. Let the desired number be $100a + 10b + c$, then we can form the following two-digit numbers: $10a + b, 10b + a, 10a + c, 10c + a, 10b + c, 10c + b$. According to the condition, we have

$(10a + b) + (10b + a) + (10a + c) + (10c + a) + (10b + c) + (10c + b) = 2(100a + 10b + c), 22a + 22b + 22c = 2(100a + 10b + c), 10c + b = 89a$. The number $10c + b$ is a two-digit number, so $89 \cdot a$ is also a two-digit number, which is possible only when $a = 1$. Then $c = 8$ and $b = 9$. Therefore, in grades V-VI of the school, there are 198 students.