init
A, B count algorithm done
Random number generate done