#B. 练24.2+2 for循环求和,求能被3整除的数的和

    Type: Default 1000ms 256MiB

练24.2+2 for循环求和,求能被3整除的数的和

No testdata at current.

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.

说明

利用for循环。计算输出能被3整除的数3+6+9...+n3+6+9...+n的和。

输入格式

输入nn。对于100%的数据,1n1001≤n≤100

输出格式

如题述,之和。

样例

10
55

第一节课比赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
4
Start at
2025-2-9 17:30
End at
2025-2-15 12:30
Duration
139 hour(s)
Host
Partic.
4