题解 | #变种水仙花#

变种水仙花

http://www.nowcoder.com/practice/c178e3f5cc4641dfbc8b020ae79e2b71

{
    int i=0;
    for(i=10000;i<100000;i++)
    {
        int count=0;
        for(int j=10;j<=i;j*=10)
         {
              int m=i%j;
              int n=i/j;
            count+=m*n;
         }
          if(count==i)
          {
              printf("%d ",i);
          }
    }
    return 0;
}
全部评论

相关推荐

此在夜:我之前也是这样,然后四五天之后进入HR面状态,发了测评,做完三十天后约了HR面
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务