#include<stdio.h> int fb(int x) { int t,t1=1,t2=1; if(x1) return 1; else if(x2) return 1; else { for(int i=2;i<x;i++) { t=(t1+t2)%10007; t1=t2; t2=t; } return t; } } int main() { long long m; scanf("%d",&m); printf("%d",fb(m)); return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account