When I input 1000(the maxium input value is 1000), it should show 125751375750. But fail. How can I printf it in the large number?
Code:#include <stdio.h> #include <stdlib.h> int n; int *w; int main() { int i, n, x; scanf("%d", &n); w = malloc(n * sizeof *w); for (i = 0; i < n; i++) scanf("%d", &w[i]); for (i = 0; i < n; i++) printf("%d %d %ld\n", i+1, w[i], w[i]*(w[i]+1)*(w[i]+2)*(w[i]+3)/8); return 0; }