제출 #9648

#제출 시각아이디문제언어결과실행 시간메모리
9648yukarikoUniting (kriii2_U)C11
컴파일 에러
0 ms0 KiB
#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); }

컴파일 시 표준 에러 (stderr) 메시지

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]