# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4310 | zorrapower | Inherited disease (kriii1_I) | C++98 | 0 ms | 1088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |