Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
52414 | OscarWLY | 连续数字 | C++ | Accepted | 0 MS | 244 KB | 317 | 2024-10-05 14:18:23 |
#include<bits/stdc++.h> using namespace std; int main() { int n,m,cnt=0; cin>>n>>m; while(n>0) { cnt++; n--; m--; cout<<1; if(n==0) break; if(cnt==2) { n--; cnt=0; cout<<0; } if(m==0) { for(int i=1;i<=n;i++) cout<<0; break; } } return 0; }