能正常输出,但不得分。求助!

P1319 压缩技术

xiaoyu_ycyz @ 2018-04-25 15:09:43

include <iostream>

using namespace std;

int main() {int k=0,l=0; int n,m; cin>>n; int i; while(cin>>m) { for(i=0;i<m;i++) { cout<<k; if(l==6) { l=0; cout<<endl;} else l++;

 }
 k=!k;

}

return 0; }


by xiaoyu_ycyz @ 2018-04-25 15:11:31

include <iostream>

using namespace std;

int main() {int k=0,l=0;

int n,m;

cin>>n;

int i;

while(cin>>m)

{ for(i=0;i<m;i++)

{ cout<<k;

if(l==6) { l=0; cout<<endl;}

else l++;

} k=!k; }

return 0; }


by A_Fantasy @ 2018-06-11 12:53:19

#include <iostream>
using namespace std;
int main() 
{
    int k=0,l=0;
    int n,m;
    cin>>n;
    int i;
    while(cin>>m)
    { 
        for(i=0;i<m;i++)
        { 
            cout<<k;
            if(l==6) { l=0; cout<<endl;}
            else l++;
         } 
         k=!k;
    }
    return 0; 
}

by A_Fantasy @ 2018-06-11 12:53:45

只能帮你到这了


|