CodeFoeces-82A

题目

原题链接:A. Double Cola

题意

5个人轮流喝可乐,喝完后分裂成两个排到队尾,问第n个喝的是谁。模拟他们喝可乐。

代码

#include
using namespace std;
int main() {
    string name[6]= {"","Sheldon","Leonard","Penny","Rajesh","Howard"};
    int n;
    scanf("%d",&n);
    if(n<6) {
        cout<0; k--) {
                    count++;
                    if(count==n) {
                        cout<

你可能感兴趣的:(CodeFoeces-82A)