判断能否被 9 整除
Division by 9
题目详情
给出一个规则:如何判断一个整数是否能被 9 整除?
Give a rule to decide if an integer is divisible by 9.
解析
一个整数能被 9 整除,当且仅当其十进制各位数字之和能被 9 整除。
因为 ,所以
Original Explanation
An integer is divisible by 9 if and only if the sum of its digits is divisible by 9. Formally, if the integer is written in decimal as then it is divisible by 9 exactly when is divisible by 9.