题解 | #开学?#
开学?
http://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
BC29 开学?
思路:
step1:输入两个数,空格隔开;
step2:使得天数相加除以7取余数;如果结果为0,则是星期天;否则,打印结果即可;
代码如下:
m,n = list(map(int,input().split()))
res = (m+n)%7
if res == 0:
print(7)
else:
print(res)