📅  最后修改于: 2022-03-11 14:59:33.357000             🧑  作者: Mango
public class DivBy9 {
public static boolean check(String ns) {
var sum = 0;
for(var i = 0; i < ns.length(); i++){
sum += Integer.parseInt(ns.charAt(i) + "");
}
return (sum%9) == 0;
}
}