add to gothib

This commit is contained in:
Ultrablob 2025-01-20 11:37:00 -05:00
commit 523f45b46a
28 changed files with 419 additions and 0 deletions

28
modern_art.py Normal file
View file

@ -0,0 +1,28 @@
width = int(input(""))
height = int(input(""))
num_strokes = int(input(""))
rows = [0] * width
columns = [0] * height
for stroke in range(num_strokes):
target, number = input("").split(" ")
if target == "C":
for i in range(height):
print(i, int(number))
cells[i][int(number)-1] = not cells[i][int(number)-1]
print(cells)
else:
for i in range(width):
print(i, int(number))
cells[int(number)-1][i] = not cells[int(number)-1][i]
print(cells)
total = 0
for row in cells:
for cell in row:
if cell:
total += 1
print(total)