AJ. 课例题 - 余数为1

    Type: Default 1000ms 64MiB

课例题 - 余数为1

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

求出 1∼n中,除2、3、5中任意一个数余数为 1的数,请问这样的数有多少个,总和是多少?

比如:1、3、4、5、6 就是满足条件的数。

输入输出说明

输入说明

一个整数 n(n≤10000) 。

输出说明

2行:

第1行 一个整数代表满足条件的数有多少个?

第2行 一个整数代表满足条件的数的和是多少?

题目样例

样例输入

6

样例输出

5
19

这些题都有点善

Not Attended
Status
Done
Rule
XCPC
Problem
42
Start at
2025-1-18 13:45
End at
2025-3-5 20:45
Duration
1111 hour(s)
Host
Partic.
17