冷笑话,超时了
查看原帖
冷笑话,超时了
1274811
MaskedFools_Sparkle楼主2024/8/16 16:25
#include<bits/stdc++.h>
using namespace std;

int num;
char temp[2];

signed main()
{
    while(1)
    {
        temp[1]=temp[0];
        temp[0]=getchar();
        if(temp[0]=='\n' || temp[0]==' ')
            break;
        
        if(temp[0]>='0' && temp[0]<='9')
            for(int times=1;times<temp[0]^'0';++times)
            {
                cout<<temp[1];
                continue;
            }
        cout<<temp[0];
    }
}

目测问题是没有跳出循环,但是不可能既不是换行也不是空格结尾ba

2024/8/16 16:25
加载中...