#include <stdio.h>
//フィボナッチ数列
//int rec(int n){
//}
int main(void) {
int n = 1;
// for(int i=1;i<=n;i++){
int an=0,b=1,c=1;
if(n==1){
an=1;
}
else if(n==2){
an=1;
}
else{
for(int i=3;i<=n;i++){
an=b+c;
c=b;
b=an;
}
}
printf("フィボナッチ数列の第%d項は%d\n", n
, an
); // }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v44OV44Kj44Oc44OK44OD44OB5pWw5YiXCi8vaW50IHJlYyhpbnQgbil7CgovL30KCmludCBtYWluKHZvaWQpIHsKICAgIGludCBuID0gMTsKICAgLy8gZm9yKGludCBpPTE7aTw9bjtpKyspewogICBpbnQgYW49MCxiPTEsYz0xOwogICBpZihuPT0xKXsKICAgCWFuPTE7CiAgIH0KICAgZWxzZSBpZihuPT0yKXsKICAgCWFuPTE7CiAgIH0KICAgZWxzZXsKICAgCWZvcihpbnQgaT0zO2k8PW47aSsrKXsKICAgCQlhbj1iK2M7CiAgIAkJYz1iOwogICAJCWI9YW47CiAgIAl9CiAgIH0KICAgICAgICBwcmludGYoIuODleOCo+ODnOODiuODg+ODgeaVsOWIl+OBruesrCVk6aCF44GvJWRcbiIsIG4sIGFuKTsKICAgLy8gfQoJcmV0dXJuIDA7Cn0KCg==