fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string z, zz;
  7. int x, y;
  8. cin >> x >> y >> z >> zz;
  9. int a;
  10. for (a = 0; a < x; ++a) {
  11. cout << a;
  12. for (int b = 1; b <= y; ++b) {
  13. cout << zz;
  14. }
  15. }
  16. cout << a;
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5680KB
stdin
3 9 n a
stdout
0aaaaaaaaa1aaaaaaaaa2aaaaaaaaa3