Day Name
Thu Aug 08 2024 22:36:46 GMT+0000 (Coordinated Universal Time)
Saved by
@k_m_s_avinash6
a=input()
b=int(input())
b=int(b%7)
if a=="Monday":
b=b
if b>7:
b=int(b%7)
elif a=="Tuesday":
b=b+1
if b>7:
b=int(b%7)
elif a=="Wednesday":
b=b+2
if b>7:
b=int(b%7)
elif a=="Thursday":
b=b+3
if b>7:
b=int(b%7)
elif a=="Friday":
b=b+4
if b>7:
b=int(b%7)
elif a=="Saturday":
b=b+5
if b>7:
b=int(b%7)
elif a=="Sunday":
b=b+6
if b>7:
b=int(b%7)
if b==1:
print("Monday")
elif b==2:
print("Tuesday")
elif b==3:
print("Wednesday")
elif b==4:
print("Thursday")
elif b==5:
print("Friday")
elif b==6:
print("Saturday")
elif b==7:
print("Sunday")
content_copyCOPY
Comments