1-3998 这些数中,各位数字之和能被 4 整除的数字有多少个?

作者: tihaiku 人气: - 评论: 0
问题 1-3998 这些数中,各位数字之和能被 4 整除的数字有多少个?
选项
答案 859
解析 解析:一位数中,满足的是4,8;两位数中个位每从0变化9至少有两个数满足,若十位能被四整除,则个位从0到9 有三个数满足,则从10到99满足的数的个数是:29+2=11 个;三位数中个位每从0变化到9至少有两个满足,若百位和十位组成的两位满足条件,则有 3 个,所以满足条件的三位数的个数有:290+11=191 个;四位数中个位每从 0 变化到 9 至少有两个满足,若千位、百位、十位组成的三位数满足条件,则有 3 个,所以 1000 到 3998 满足的数的个数是:2300+230+23=666 个。所以满足条件的一共有: 2+191+666=859 个。

相关内容:1-3998,数中,数字,之和

猜你喜欢

更多 网友评论0 条评论)
暂无评论
错误啦!

错误信息

  • 消息: [程序异常] : MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
  • 文件: /twcms/kongphp/cache/cache_redis.class.php
  • 位置: 第 85 行
    <?php echo 'KongPHP, Road to Jane.'; ?>