Demo entry 6786681

noj.am/2193

   

Submitted by test on Apr 03, 2019 at 04:17
Language: C. Code size: 435 Bytes.

#include <stdio.h>
#include <stdint.h>

int main(int argc, char **argv)
{
        int N, i;
        uint64_t X[2] = {0, 1}, Y[2], *x = X, *y = Y, *z;
        scanf("%d", &N);
        for(i = 1; i < N; i++)
        {
                z = x;
                x = y;
                y = z;
                x[1] = y[0];
                x[0] = y[0] + y[1];
        }
        printf("%ld\n", x[0] + x[1]);
        return 0;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).