• 2645 不一样的斐波那契

    Time Limit : 2000/1000 MS(Java/Others) | Memory Limit : 65536/32768 KB(Java/Others)

    Submits : 13861 | Solved : 7227

    Description

    设计函数,求解Fibonacci数列中大于n的第一个数及其在Fibonacci数列中的序号在main函数中输入n验证。


    Input

    主函数中输入一个整数n(n≥1)


    Output

    设计函数求出Fibonacci数列中大于n的第一个数及其在Fibonacci数列中的序号并输出结果。


    Sample Input

    1000

    Sample Output

    Value=1597,Location=17

    Template

    #include<stdio.h>
    @-@  //设计函数
     
    int main()
    {
    int n;
     
    scanf("%d",&n);
    Fibo(n);  //调用函数
    return 0;
    }

    HINT

    程序填空题,模板中@-@的位置是需要填空的部分。


    Source

    NBU OJ

    [ Top ] | [ Submit ] | [ Statistics ] | [ Standing ]