fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n, m;
  6. cin >> m >> n;
  7. for(int i=1; i<=m; i++){
  8. for(int j=1; j<=n; j++){
  9. if((i+j)%3==0) cout << 2;
  10. else{
  11. if(j%3==0){
  12. if((i+j+1)%3==0) cout << 1;
  13. else cout << 3;
  14. }
  15. else if((j-1)%3==0) cout << 1;
  16. else cout << 3;
  17. }
  18. }
  19. cout << endl;
  20. }
  21. return 0;
  22. }
Compilation error #stdin #stdout 0s 3464KB
stdin
10 10
stdout
Standard output is empty