📅  最后修改于: 2022-03-11 14:48:15.705000             🧑  作者: Mango
You can simply use % Modulus operator to check divisibility.
For example: n % 2 == 0 means n is exactly divisible by 2 and n % 2 != 0 means n is not exactly divisible by 2.