Skip to content

Commit f6e431a

Browse files
try to solve 14
1 parent 600aec0 commit f6e431a

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

14.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,29 @@
1616
count = 0
1717
x = 0
1818
y = 0
19+
flag = 1
20+
len = 100
1921
while y < result_y:
20-
while x < result_x:
22+
while x < len:
2123
drawer.point((x, y), im.getpixel((count, 0)))
2224
print("y is {}, x is {}, count is {}".format(y, x, count))
2325
x += 1
2426
count += 1
25-
if y % 2 == 0:
26-
result_x -= 1
27-
y += 1
28-
x = 0
27+
if flag %4 == 0:
28+
y += 1
29+
x = 0
30+
if flag % 2 == 1:
31+
len -= 1
32+
flag += 1
2933

34+
result.show()
3035

31-
result.show()
36+
"""
37+
1 100
38+
2 99
39+
3 99
40+
4 98
41+
42+
5 98
43+
6 97
44+
"""

0 commit comments

Comments
 (0)