-
Notifications
You must be signed in to change notification settings - Fork 0
/
spoj_char7.py
43 lines (40 loc) · 1.25 KB
/
spoj_char7.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
t = int(raw_input())
for _ in range(t):
rows, columns, size = map(int, raw_input().split())
output = ""
char = ""
# for _ in range(rows):
for i in range(2*size*rows):
output = ""
for j in range(2*size*columns):
if j >= 2*size:
j = j%(2*size)
if i >= 2*size:
i = i%(2*size)
if j == (size+i) or j == (i-size):
char = '\\'
elif j == (size-i-1) or j == (3*size-i-1):
char = '/'
else:
char = '.'
output = output+char
print output
# t = int(raw_input())
#
# for _ in range(t):
# rows, columns, size = map(int, raw_input().split())
# output = ""
# char = ""
# for _ in range(rows):
# for i in range(2 * size):
# output = ""
# for _ in range(columns):
# for j in range(2 * size):
# if j == (size + i) or j == i - size:
# char = '\\'
# elif j == (size - i - 1) or j == (3 * size - i - 1):
# char = '/'
# else:
# char = '.'
# output = output + char
# print output