赞
踩
- #include<stdio.h>
-
- int main()
- {
- int N,x1 = 1,x2 = 1,sum = 1,month = 2;
- scanf("%d",&N);
- if(N == 1)
- {
- printf("1");
- }
- else
- {
- while(sum < N)
- {
- month++;
- sum = x1+x2;
- x1 = x2;
- x2 = sum;
-
- }
- printf("%d",month);
- }
-
- return 0;
-
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。