# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
9350 |
2014-09-28T05:48:06 Z |
yukariko |
Uniting (kriii2_U) |
C |
|
0 ms |
1360 KB |
#include <stdio.h>
//#include <windows.h>
int main()
{
int N;
int s[100001];
long long cnt;
long long sum;
int i;
cnt = 1;
sum = 0;
scanf("%d",&N);
for(i=0;i<N;i++) scanf("%d",s+i);
for(i=0;i<N-1;i++)
{
sum += s[i]*s[i+1];
s[i+1] += s[i];
}
for(i=N;i>=2;i--)
{
cnt *= i*(i-1);
}
cnt = cnt%1000000007;
printf("%d\n",sum);
printf("%d",cnt);
//system("pause");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
0 ms |
1360 KB |
Output is partially correct |
2 |
Partially correct |
0 ms |
1360 KB |
Output is partially correct |
3 |
Partially correct |
0 ms |
1352 KB |
Output is partially correct |
4 |
Partially correct |
0 ms |
1356 KB |
Output is partially correct |
5 |
Partially correct |
0 ms |
1352 KB |
Output is partially correct |
6 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
7 |
Halted |
0 ms |
0 KB |
- |