Skip to content

Commit

Permalink
20241228 Create cf323a_huqingchang.py (#9169)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhouqingshan1 authored Dec 29, 2024
1 parent 52e5c5d commit d93da1a
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
def main():
n = II()
if n & 1:
print(-1)
return
cur = 0
for _ in range(n):
cur ^= 1
g = [[''] * n for _ in range(n)]
# tmp = cur
for i in range(n // 2):
for j in range(n // 2):
tmp = cur
if (i + j) & 1:
tmp = cur ^ 1
color = ''
if not tmp:
color = 'w'
else:
color = 'b'
for k in range(2 * i, 2 * i + 2):
for l in range(2 * j, 2 * j + 2):
g[k][l] = color
for r in g:
print(''.join(r))
print()


T = 1
for ii in range(T):
# print(main())
main()

0 comments on commit d93da1a

Please sign in to comment.