v3.26.3
Income Taxes - Reconciliation of Effective Tax Rates from 25% Statutory Tax Rates (Detail) - USD ($)
$ in Thousands
12 Months Ended
May 31, 2026
May 31, 2025
May 31, 2024
Income Tax Expense (Benefit), Effective Income Tax Rate Reconciliation, Amount [Abstract]      
Income before income taxes and loss from equity method investments $ 730,549 $ 536,384 $ 493,841
Income tax at statutory income tax rate   134,096 123,460
Effect of non-deductible expenses and loss and super deduction expenses 8,048 44,173 68,741
Effect of income tax exemptions and preferential tax rates   (26,561) (24,810)
Changes in valuation allowance 19,424 (4,610) (48,615)
Effect of income tax rate difference in other jurisdictions   (804) (9,086)
Other jurisdictions' tax effects (3,702)    
Share-based compensation 15,795    
Effect of R&D super-deduction (9,408)    
Effect on tax holiday and preferential tax treatment (24,025)    
Other adjustments 7,342    
Provision for income taxes $ 196,111 $ 146,294 $ 109,690
Effective Income Tax Rate Reconciliation, Percent [Abstract]      
PRC statutory income tax rate 25.00% 25.00% 25.00%
Other jurisdictions' tax effects (0.05%)    
Changes in valuation allowance 2.60%    
Share-based compensation 2.20%    
Others 1.10%    
Effect of R&D super-deduction (1.30%)    
Effect on tax holiday and preferential tax treatment (3.30%)    
Other adjustments 1.00%    
Effective tax rate for the Group 26.80%    
Income Tax Jurisdiction, Foreign, Other [Member]      
Income Tax Expense (Benefit), Effective Income Tax Rate Reconciliation, Amount [Abstract]      
Chinese mainland EIT rate $ 182,637