v3.26.3
Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
12 Months Ended
May 31, 2026
May 31, 2025
May 31, 2024
Cash flows from operating activities      
Net income $ 516,661 $ 375,833 $ 325,218
Adjustments to reconcile net income to net cash provided by operating activities      
Depreciation of property and equipment 171,743 139,807 100,646
Amortization of intangible assets 5,849 5,745 6,093
Amortization of land use rights 1,137 336 81
Loss on disposal of property and equipment 8,079 2,370  
Loss on deconsolidation of subsidiaries   1,048  
Goodwill impairment   60,299  
Impairment loss from long-term investments   5,215 30,007
Realized gain from long-term investments (2,384) (422) (185)
(Gain)/loss from fair value change of investments (10,613) 10,078 (19,025)
Share-based compensation expenses 88,466 59,933 122,458
Allowance for doubtful accounts 1,568 641 (612)
Loss from equity method investments 17,777 14,257 58,933
Deferred income taxes (8,086) (29,317) (21,231)
Return on investment from an equity method investee 47 59 1,386
Changes in operating assets and liabilities      
Accounts receivable (2,745) (16,953) 3,339
Inventory (19,008) 12,427 (41,214)
Prepaid expenses and other current assets (27,949) 32,215 (108,630)
Amounts due from related parties (133) (896) (48)
Long-term deposits (4,314) (10,404) (12,191)
Right-of-use assets (9,380) (138,009) (223,101)
Accounts payable 39,032 (23,001) 37,793
Accrued expenses and other current liabilities 58,938 57,452 160,036
Income taxes payable 36,425 34,700 21,723
Amounts due to related parties (330) (149) 211
Deferred revenue 157,654 163,824 468,197
Operating lease liabilities 8,646 139,504 212,759
Net cash provided by operating activities 1,027,080 896,592 1,122,643
Cash flows from investing activities      
Purchase of term deposits (1,235,581) (1,482,948) (981,153)
Proceeds from maturity of term deposits 1,382,200 1,529,093 801,626
Payments for short-term investments (2,381,037) (2,780,709) (2,626,749)
Proceeds from maturity of short-term investments 2,015,915 2,979,482 2,013,408
Purchase of property and equipment (246,869) (241,938) (249,393)
Proceeds from disposal of property and equipment 298 261 423
Payments for long-term investments (13,686) (64,314) (77,892)
Proceeds from disposal of long-term investments 14,176 1,817 1,191
Payment for land use rights (38) (17,273) (33,995)
Loans provided to related parties (1,405) (6,371) (1,388)
Return of investments from equity method investees 8,326 4,622  
Deconsolidation of subsidiaries   (15,150)  
Net cash used in investing activities (457,701) (93,428) (1,153,922)
Cash flows from financing activities      
Proceeds from issuances of common shares upon exercise of share options 5,686 12,950 3,931
Cash paid for shares repurchase (230,890) (445,495) (62,943)
Cash paid for employees' individual income taxes on withheld shares from exercise of NES (19,443) (29,333) (16,721)
Payments made after business acquisitions   (9,350)  
Cash paid for dividend (96,361) (98,197)  
Repurchase and redeem of unsecured senior notes (14,403)   (240)
Purchase of non-controlling interests (24,742) (15,546) (84,465)
Net cash used in financing activities (380,153) (584,971) (160,438)
Effects of exchange rate changes 90,131 9,836 (24,606)
Net change in cash, cash equivalents and restricted cash 279,357 228,029 (216,323)
Cash, cash equivalents and restricted cash at beginning of year 1,817,133 1,589,104 1,805,427
Cash, cash equivalents and restricted cash at end of year 2,096,490 1,817,133 1,589,104
Supplement disclosure of cash flow information:      
Income taxes paid 168,547 147,552 109,154
Interests paid 153 311 355
Non-cash investing and financing activities      
Payable for investments and acquisitions 605 567 9,885
Payable for purchase of property and equipment $ 58,279 $ 52,004 $ 36,136