-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeup.py
More file actions
30 lines (30 loc) · 829 Bytes
/
Copy pathcodeup.py
File metadata and controls
30 lines (30 loc) · 829 Bytes
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
n = int(input())
for i in range(1, n + 1):
if n < 30:
if i % 10 == 3:
print("X")
elif i % 10 == 6:
print("X")
elif i % 10 == 9:
print("X")
else:
print(i)
if n >= 30:
if 0 <= i % 30 <= 9:
if i % 10 == 3:
print("XX")
elif i % 10 == 6:
print("XX")
elif i % 10 == 9:
print("XX")
else:
print("X")
else:
if i % 10 == 3:
print("X")
elif i % 10 == 6:
print("X")
elif i % 10 == 9:
print("X")
else:
print(i)