I don’t think you can use this as a gauge of how good the educational system of the country ON AVERAGE is.
There will always be those who are way above average in ANY COUNTRY regardless of how good or bad the public school system is.
Take the case of the Indian, Srinivasa Ramanujan.
He grew up in a village with little or no formal math training.
Yet, he became an extraordinary mathematician and autodidact who, with almost no formal training in pure mathematics, made extraordinary contributions to mathematical analysis, number theory, infinite series, and continued fractions.
Living in India with no access to the larger mathematical community, which was centred in Europe at the time, Ramanujan developed his own mathematical research in ISOLATION.
As a result, he sometimes REDISCOVERED already known theorems in addition to producing new work.
Ramanujan was said to be a natural genius by the English mathematician and Cambridge professor, G. H. Hardy (who discovered his talent), in the same league as mathematicians such as Euler and Gauss.