Submission
Status:
xxxxxxxxxxxxxxxxxxxx
Subtask/Task Score:
0/100
Score: 0
User: ackub
Problemset: Abacus
Language: python
Time: 0.000 second
Submitted On: 2026-08-31 18:30:57
def kid(n):
down = 0
up = 0
while n > 0:
if n >= 5:
up += 1
n -= 5
else:
down += 1
n -= 1
return down, up
num = input()
down = [0, 0, 0, 0, 0, 0, 0, 0]
up = [0, 0, 0, 0, 0, 0, 0, 0]
for i in range(len(num)):
d, u = kid(int(num[-(i+1)]))
down[7-i] = d
up[7-i] = u
print('* * * * * * * *')
text1 = ""
text2 = ""
for i in range(len(up)):
if i == 7:
if up[i] == 1:
text1 += " "
text2 += "*"
else:
text1 += "*"
text2 += " "
else:
if up[i] == 1:
text1 += " "
text2 += "* "
else:
text1 += "* "
text2 += " "
print(text1)
print(text2)
print("-----------------")
text1 = ""
text2 = ""
text3 = ""
text4 = ""
text5 = ""
for i in range(len(down)):
if i == 7:
if down[i] == 4:
text1 += "*"
text2 += "*"
text3 += "*"
text4 += "*"
text5 += " "
elif down[i] == 3:
text1 += "*"
text2 += "*"
text3 += "*"
text4 += " "
text5 += "*"
elif down[i] == 2:
text1 += "*"
text2 += "*"
text3 += " "
text4 += "*"
text5 += "*"
elif down[i] == 1:
text1 += "*"
text2 += " "
text3 += "*"
text4 += "*"
text5 += "*"
else:
text1 += " "
text2 += "*"
text3 += "*"
text4 += "*"
text5 += "*"
else:
if down[i] == 4:
text1 += "* "
text2 += "* "
text3 += "* "
text4 += "* "
text5 += " "
elif down[i] == 3:
text1 += "* "
text2 += "* "
text3 += "* "
text4 += " "
text5 += "* "
elif down[i] == 2:
text1 += "* "
text2 += "* "
text3 += " "
text4 += "* "
text5 += "* "
elif down[i] == 1:
text1 += "* "
text2 += " "
text3 += "* "
text4 += "* "
text5 += "* "
else:
text1 += " "
text2 += "* "
text3 += "* "
text4 += "* "
text5 += "* "
print(text1)
print(text2)
print(text3)
print(text4)
print(text5)
print("* * * * * * * *")