杭电acm2114
#include <stdio.h> int main() { __int64 n, ans; while(~scanf("%l64d", &n)) { n %= 10000; ans = (n*n*(n+1)*(n+1)) / 4; printf("%04d\n", ans%10000); } return 0; }
#include <stdio.h> int main() { __int64 n, ans; while(~scanf("%l64d", &n)) { n %= 10000; ans = (n*n*(n+1)*(n+1)) / 4; printf("%04d\n", ans%10000); } return 0; }