#C. 【例25.3】 输出奇偶数之和

    Type: Default 1000ms 256MiB

【例25.3】 输出奇偶数之和

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循环,分别输出1n1 \sim n之间的所有奇数的和、偶数的和。

输入格式

输入nn(1n1001≤n≤100)。

输出格式

输出为一行,两个数(用一个空格隔开),偶数之和与奇数之和。

样例

10
30 25

2024022204-day4

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
9
Start at
2024-2-22 17:00
End at
2024-2-22 18:30
Duration
1.5 hour(s)
Host
Partic.
4