#include <stdio.h>
int luckyCustomer(int num){
if (num <= 2)
return 1;
int c_num = 1;
int p_num = 1;
int k = 2;
while (num > k){
c_num, p_num = c_num + p_num, c_num;
k += 1;
}
return c_num;
}
int main()
{
int num;
scanf("%d",&num);
printf("order id :%d",luckyCustomer(num));
return 0;
}
Comments
Leave a comment