1 solutions
-
0
#include<bits/stdc++.h> using namespace std; const int N=110; char g[N][N]; int main() { int n,a,b; cin>>n>>a>>b; char ch='#'; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { if((i+j)%2==0) ch='.'; else ch='#'; for(int k=0;k<a;k++) { for(int l=0;l<b;l++) { g[i*a+k][j*b+l]=ch; } } } } for(int i=0;i<n*a;i++) { for(int j=0;j<n*b;j++) { cout<<g[i][j]; } cout<<endl; } return 0; }
- 1
Information
- ID
- 2450
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- (None)
- # Submissions
- 3
- Accepted
- 2
- Uploaded By