mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
15 lines
224 B
C
15 lines
224 B
C
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
unsigned s1 = 0, s2 = 0, i;
|
|
for (i = 1; i <= 100; i++)
|
|
{
|
|
s1 += i * i;
|
|
s2 += i;
|
|
}
|
|
unsigned ans = s2 * s2 - s1;
|
|
printf("%u\n", ans);
|
|
return 0;
|
|
}
|