Submission #9648

# Submission time Handle Problem Language Result Execution time Memory
9648 2014-09-28T07:49:13 Z yukariko Uniting (kriii2_U) C
Compilation error
0 ms 0 KB
#include <stdio.h>
int main()
{
  int N;
  long long s[100001];
  long long cnt;
  long long sum;
  int i,j;
  
  cnt = 1;
  sum = 0;
  
  scanf("%d",&N);  
  for(i=0;i<N;i++)scanf("%lld",s+i); 
  for(i=0;i<N-1;i++)
  {
    sum += s[i]*s[i+1];
    s[i+1] += s[i];
    cnt = (((cnt*(N-i))%1000000007LL)*(N-i-1)))%1000000007LL;
  }
  printf("%lld\n",sum);
  printf("%lld\n",cnt%1000000007LL);
}

Compilation message

U.c: In function 'main':
U.c:19:47: error: expected ';' before ')' token
U.c:19:47: error: expected statement before ')' token
U.c:19:48: error: expected expression before '%' token
U.c:8:9: warning: unused variable 'j' [-Wunused-variable]
U.c:13:8: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
U.c:14:24: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
U.c:23:1: warning: control reaches end of non-void function [-Wreturn-type]