mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ddd34a4f1c
2000-2099
20 lines
388 B
C++
20 lines
388 B
C++
#include <stdio.h>
|
|
int main(void)
|
|
{
|
|
unsigned int m, n, i, x, y;
|
|
while (scanf("%u%u", &m, &n) != EOF)
|
|
{
|
|
if (m > n)
|
|
{
|
|
i = n;
|
|
n = m;
|
|
m = i;
|
|
}
|
|
x = y = 0;
|
|
for (i = m ; i <= n ; i++)
|
|
(i & 1) ? (y += i*i*i) : (x += i*i);
|
|
printf("%u %u\n", x, y);
|
|
}
|
|
return 0;
|
|
}
|