4 solutions

  • 1
    @ 2025-7-15 9:29:02

    #include ; using namespace std; int main (){ int n; cin >> n; char c1 = 'A'; for ( int i = 0; i < n; i++ ){ char c2 = c1; for ( int j = 0; j < n; j++ ){ cout << c2; c2++; if ( c2 > 'Z' ) c2 = 'A'; } c1++; if ( c1 > 'Z' ) c1 = 'A'; cout << endl; } return 0; }

    • 1
      @ 2025-4-26 6:30:34
      #include <bits/stdc++.h>
      #define endl '\n'
      
      using namespace std;
      
      typedef long long ll;
      
      int main() {
          int n;
          cin >> n;
          for (int i = 1; i <= n; i++) {
              for (int j = i; j < i + n; j++) {
                  cout << char((j - 1) % 26 + 'A');
              }
              cout << endl;
          }
          return 0;
      }
      
      • 0
        @ 2025-7-15 9:29:20

        #include ; using namespace std; int main (){ int n; cin >> n; char c1 = 'A'; for ( int i = 0; i < n; i++ ){ char c2 = c1; for ( int j = 0; j < n; j++ ){ cout << c2; c2++; if ( c2 > 'Z' ) c2 = 'A'; } c1++; if ( c1 > 'Z' ) c1 = 'A'; cout << endl; } return 0; }

        • 0
          @ 2025-7-12 20:46:48
          #include<bits/stdc++.h>
          using namespace std;
          int main(){
          	int x;
          	cin>>x;
          	for(int i=0;i<x;i++){
          		for(int j=i;j<i+x;j++){
          			char danci=j%26+'A';
          			cout<<danci;
          		}
          		cout<<endl;
          	}
          	return 0;
          }
          
          • 1

          Information

          ID
          4860
          Time
          1000ms
          Memory
          128MiB
          Difficulty
          1
          Tags
          # Submissions
          47
          Accepted
          24
          Uploaded By