Unfortunately we were unable to fully decode your file, as it is not encoded in UTF-8.
You can try to decode it yourself by downloading it here.
//Iloczyn, PA 2014, runda pr�bna //Wiktoria Ko�ny #include<cstdio> const int MF=50; long long n, ifib=2, fib[MF]; int main(){ int i, j, t, it, tak; fib[0]=0; fib[1]=1; while(fib[ifib-1]<(long long)1000000000){ fib[ifib]=fib[ifib-1]+fib[ifib-2]; ifib++; //printf("%lld %lld\n", ifib, fib[ifib-1]); } scanf("%d\n", &it); for(int t=0; t<it; t++){ scanf("%d", &n); tak=0; for(i=0; tak==0 && i<ifib; i++){ for(j=i; j<ifib; j++) if(n==fib[i]*fib[j]){ tak=1; break; } } if(tak) printf("TAK\n"); else printf("NIE\n"); } return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | //Iloczyn, PA 2014, runda pr�bna //Wiktoria Ko�ny #include<cstdio> const int MF=50; long long n, ifib=2, fib[MF]; int main(){ int i, j, t, it, tak; fib[0]=0; fib[1]=1; while(fib[ifib-1]<(long long)1000000000){ fib[ifib]=fib[ifib-1]+fib[ifib-2]; ifib++; //printf("%lld %lld\n", ifib, fib[ifib-1]); } scanf("%d\n", &it); for(int t=0; t<it; t++){ scanf("%d", &n); tak=0; for(i=0; tak==0 && i<ifib; i++){ for(j=i; j<ifib; j++) if(n==fib[i]*fib[j]){ tak=1; break; } } if(tak) printf("TAK\n"); else printf("NIE\n"); } return 0; } |