Advertisement
Zinak

Untitled

Sep 23rd, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.  int n,k,i;
  6.  cin>>n>>k;
  7. string s;
  8. cin>>s;
  9. if(s.size()==1)
  10.     cout<<0<<endl;
  11. else{
  12.     s[0]=1;
  13. for(i=1;i<k;i++)
  14. s[i]=0;
  15. cout<<s<<endl;
  16. }
  17.   return 0;
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement