随笔 - 5  文章 - 0  trackbacks - 0
<2009年3月>
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

常用链接

留言簿(1)

随笔分类

随笔档案

文章分类

搜索

  •  

最新评论

阅读排行榜

评论排行榜

 1import java.util.*;
 2import java.lang.*;
 3
 4public class DivisorDigits {
 5    public int howMany(int number) {
 6        
 7        int ans = 0;
 8        int n = number;
 9        while (n != 0{
10            int n1 = n % 10;
11            if (n1 != 0 && number % n1 == 0{
12                ++ans;
13            }

14            n /= 10;
15        }

16        return ans;
17        
18    }

19}
posted on 2009-03-21 10:27 edwing 阅读(109) 评论(0)  编辑  收藏 所属分类: tc_exercise

只有注册用户登录后才能发表评论。


网站导航: