|
|
|
|
|
|
|
|
#include <limits.h> |
|
|
#include <limits.h> |
|
|
#define typ long long int |
|
|
#define typ long long int |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool is_it_a_prim(typ* x){ |
|
|
|
|
|
|
|
|
bool foo(typ* x){ |
|
|
int k = 2; |
|
|
int k = 2; |
|
|
while(k < *x){ |
|
|
while(k < *x){ |
|
|
if(*x % k == 0) |
|
|
if(*x % k == 0) |
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(void){ |
|
|
int main(void){ |
|
|
typ fn = 0, fn_1 = 1, fn_2 = 0; |
|
|
typ fn = 0, fn_1 = 1, fn_2 = 0; |
|
|
int i = 2; |
|
|
|
|
|
while(fn < LLONG_MAX) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("%llu",ULONG_MAX); |
|
|
|
|
|
|
|
|
|
|
|
while(fn < ULONG_MAX) |
|
|
{ |
|
|
{ |
|
|
fn = fn_1 + fn_2; |
|
|
|
|
|
if(is_it_a_prim(&fn)) |
|
|
|
|
|
printf("%d\t%llu\n",i ,fn); |
|
|
|
|
|
|
|
|
fn = (typ)fn_1 + (typ)fn_2; |
|
|
|
|
|
if(foo(&fn)) |
|
|
|
|
|
printf("%llu\n",fn); |
|
|
fn_2 = fn_1; |
|
|
fn_2 = fn_1; |
|
|
fn_1 = fn; |
|
|
fn_1 = fn; |
|
|
i++; |
|
|
|
|
|
} |
|
|
} |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |