pmkmzfuzsotqotmzs @ 2024-07-22 11:11:38
不知道为什么先输出换行
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
getline(cin,s);
string s1;
int sq=s[0]-'0';
int sum=0;
int a=-1;
for(int i=1;i<s.length();i++)
{
if(s[i]!=' ')
{
sum++;
if(sum%2==0)
for(int j=0;j<s[i]-'0';j++)
{
a++;
if(a%7==0)
cout<<endl;
cout<<1;
}
else
for(int j=0;j<s[i]-'0';j++)
{
a++;
if(a%7==0)
cout<<endl;
cout<<0;
}
}
}
return 0;
}
by QinKanghua @ 2024-07-23 21:37:12
一开始
by QinKanghua @ 2024-07-23 21:38:10
by pmkmzfuzsotqotmzs @ 2024-07-24 12:22:21
谢谢