You are not logged in. Please login at to post your questions!


Could someone please tell me why the compiler is displaying "Wrong Answer" for the code below?

t=int(input()) for i in range(t): s,e,l,r=input().split() l=int(l) r=int(r) if s=="monday": start=1 if e=="monday": end=1 if s=="tuesday": start=2 if e=="tuesday": end=2 if s=="wednesday" : start=3 if e=="wednesday":
end=3 if s=="thursday": start=4 if e=="thursday":
end=4 if s=="friday": start=5 if e=="friday": end=5 if s=="saturday" : start=6 if e=="saturday":
end=6 if s=="sunday": start=7 if e=="sunday": end=7 diff=abs(start-end)+1 if (diff in list(range(l,r+1))) and (diff+7 not in list(range(l,r+1))): print(diff) elif (diff in list(range(l,r+1))) and (diff+7 in list(range(l,r+1))): print("many") else: print("impossible")

asked 19 Dec '18, 23:33

potterhead123's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 19 Dec '18, 23:33

question was seen: 41 times

last updated: 19 Dec '18, 23:33