ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1493. One Step from Happiness

Runtime error WA 14( Python)
Posted by Akashi 13 Sep 2022 23:20
a = input()
minussum=0
plussum=0
b =[0:3]
c =[3:6]
c=int(c)
minus = c-1
plus = c+1
minus=str(minus)
plus=str(plus)
for i in minus:
    i=int(i)
    minussum+=i
for i in plus:
    i=int(i)
    plussum+=i
n=0
for i in b:
    i=int(i)
    n+=i
if n == minussum or n == plussum:
    print("Yes")
else:
    print("No")




Help please)
Why re?

Edited by author 13.09.2022 23:21