Submission #4310

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
43102013-09-12 08:43:52zorrapowerInherited disease (kriii1_I)C++98
0 / 1
0 ms1088 KiB
#include<stdio.h>
void get_N_generationArea(double n,double *start, double *end);
double Factorial(double n);
double getResult(double n, double *start, double *end);
double Array[100];
double n;
int main(void){
double start,end;
get_N_generationArea(2, &start, &end);
scanf("%lf", &n);
for(int i=0; i<n; i++)
scanf("%lf", &Array[i]);
for(int i=1; i<=n; i++){
printf("%d\n", (int)getResult(i, &start, &end)%1000000007);
}
return 0;
}
void get_N_generationArea(double n,double *start, double *end){
*start=0;
*end=0;
for(int i=1; i<=n; i++){
*end+=Factorial(i);
*start=*end-Factorial(i)+1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...