mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
12 lines
219 B
C++
12 lines
219 B
C++
|
#include <stdio.h>
|
||
|
int main()
|
||
|
{
|
||
|
__int64 n,s;
|
||
|
while(~scanf("%I64d",&n))
|
||
|
{
|
||
|
s=((n*(n+1)/2%10000)*(n*(n+1)/2%10000))%10000;
|
||
|
printf("%04I64d\n",s);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|