#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void rev_str(char s[]){ //反转字符串
    int c,i,j;
    for (i = 0, j = strlen(s) - 1; i < j; i++, j--){
        c = s [i];
        s[i] = s[j];
        s[j] = c;
    }
}
int fib(int n){
    char str1[10], str2[10];
    if (n == 1 || n == 2) return 1;
    if (n <= 7) return fib(n - 1) + fib(n - 2);
    else {
            sprintf(str1, "%d", fib(n - 1));
            sprintf(str2, "%d", fib(n - 2));
            rev_str(str1);rev_str(str2);
            return atoi(str1)+atoi(str2);
    }
}
int main()
{
    int n;
    scanf("%d", &n);
    printf("%d\n", fib(n));
    return 0;
}
 
         
         
         
         
         
         
         
         
         
         
         
         
        
Iccanobif numbers
我觉得不太对吧。。。。。
研究完毕,这题有毒
答案正被作为标本研究中……