Submission #9257

#TimeUsernameProblemLanguageResultExecution timeMemory
9257shashackPhibonacci (kriii2_P)C++98
0 / 4
1000 ms1084 KiB
#include <stdlib.h>
#include <stdio.h>

#define FOR(variable, start, end) for(int variable=(start); variable<=(end); ++variable)
#define LL long long 
using namespace std; // 700B

LL a, b, c, nf[4];

void pi(){
	nf[0] = 0;
	nf[1] = 0;
	nf[2] = 1;
	nf[3] = 1;
	FOR(i,1,a){
		nf[2] = nf[3];
		nf[0] = nf[1];
		nf[1] = nf[2];
		nf[3] = (nf[0] + nf[1]) % 1000000007;
	}
}

int main(){
	scanf("%lld%lld", &a, &b);

	pi();

	printf("%lld %lld\n", nf[1], nf[0]);
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...