Children’s Queue

There are many students in PHT School. One day, the headmaster whose name is PigHeader wanted all students stand in a line. He prescribed that girl can not be in single. In other words, either no girl in the queue or more than one girl stands side by side. The case n=4 (n is the number of children) is likeFFFF, FFFM, MFFF, FFMM, MFFM, MMFF, MMMMHere F stands for a girl and M stands for a boy. The total number of queue satisfied the headmaster’s needs is 7. Can you make a program to find the total number of queue with n children?

,以前我是个爱仰望天空的人,苍蓝的天空总是给我求生的勇气,

Children’s Queue

相关文章:

你感兴趣的文章:

标签云: