- #include<string>
- #include<utility>
- #include<iostream>
- using namespace std;
- int main()
- {
- int x;
- while(cin>>x)
- {
- if(x==0)
- break;
- pair<string,string> token(string(x,'#'),string(x,'.'));
- for(int i=0;i<8;i++)
- {
- for(int k=0;k<x;k++)
- {
- for(int j=0;j<4;j++)
- {
- if(!(i%2))
- cout<<token.first<<token.second;
- else
- cout<<token.second<<token.first;
- }
- cout<<"\n";
- }
- }
- }
- return 0;
- }
複製代碼 |