Skip to content

Commit 92aa17d

Browse files
committed
random codeforces ez
1 parent 7401863 commit 92aa17d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Diff for: codeforces/705/a.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
n = int(input())
2+
words = ["hate", "love"]
3+
p = 0
4+
5+
ans = ""
6+
while n > 0:
7+
ans += "I {} that ".format(words[p])
8+
n -= 1
9+
p = 1 - p
10+
11+
print(ans[:-5] + "it")

Diff for: codeforces/711/a.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
n = int(input())
2+
bus = []
3+
works = False
4+
5+
for _ in range(n):
6+
bus.append(input())
7+
8+
for i, row in enumerate(bus):
9+
if row[:2] == "OO":
10+
bus[i] = "++" + row[2:]
11+
works = True
12+
break
13+
elif row[-2:] == "OO":
14+
bus[i] = row[:-2] + "++"
15+
works = True
16+
break
17+
18+
if works:
19+
print("YES")
20+
print('\n'.join(bus))
21+
else:
22+
print("NO")

0 commit comments

Comments
 (0)