-
Notifications
You must be signed in to change notification settings - Fork 0
/
bijele.py
61 lines (55 loc) · 1.03 KB
/
bijele.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
king, queen, rook, bishop, knight, pawn = map(int, input().split())
count = 0
while king != 1:
if king < 1:
king += 1
count += 1
elif king > 1:
king -= 1
count -= 1
print(count, end=' ')
count = 0
while queen != 1:
if queen < 1:
queen += 1
count += 1
elif queen > 1:
queen -= 1
count -= 1
print(count, end=' ')
count = 0
while rook != 2:
if rook < 2:
rook += 1
count += 1
elif rook > 2:
rook -= 1
count -= 1
print(count, end=' ')
count = 0
while bishop != 2:
if bishop < 2:
bishop += 1
count += 1
elif bishop > 2:
bishop -= 1
count -= 1
print(count, end=' ')
count = 0
while knight != 2:
if knight < 2:
knight += 1
count += 1
elif knight > 2:
knight -= 1
count -= 1
print(count, end=' ')
count = 0
while pawn != 8:
if pawn < 8:
pawn += 1
count += 1
elif pawn > 8:
pawn -= 1
count -= 1
print(count, end=' ')