fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--)
  8. {
  9. int n,a;
  10. cin >> n >> a;
  11. for(int i=0;i<a;i++)
  12. {
  13. cout << "1" ;
  14. }
  15. for(int i=0;i<n-a;i++)
  16. {
  17. cout << "0" ;
  18. }
  19. cout << endl;
  20. }
  21. return 0;
  22. }
Success #stdin #stdout 0s 5308KB
stdin
5
4 2
5 3
5 5
6 2
1 1
stdout
1100
11100
11111
110000
1