在1至100这100个数中,有既不能被5整除也不能被9整除的数,它们的和是( )。 A. 1644 B. 1779 C. 3406 D. 3541

作者: tihaiku 人气: - 评论: 0
问题 在1至100这100个数中,有既不能被5整除也不能被9整除的数,它们的和是( )。 A. 1644 B. 1779 C. 3406 D. 3541
选项
答案 D
解析 先求出被5或9整除的数的和。 1-100中被5整除的数有5,10,15,...,100,和为 5 + 10 + 15+-----+100=(100 + 5) X20 + 2 = 1050。 1-100中被9整除的数有9,18,…,99,和为 9 + 18 + 27+-----+99= (9 + 99) X 11 + 2 = 594。 又因为1-100中,45,90这两个数同时被5与9整除,于是所求的和是(1 + 2+-----+100)-(5 +10+-----+100)-(9 + 18+-----+99) +(45 + 90) = 3541。

相关内容:个数

猜你喜欢

更多 网友评论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.'; ?>