小学奥数 7831 计算星期几 python
作者:互联网
http://noi.openjudge.cn/math/7831/
"""
小学奥数 7831 计算星期几
http://noi.openjudge.cn/math/7831/
信息学奥赛一本通 1083:计算星期几 | OpenJudge NOI 小学奥数 7831
https://blog.csdn.net/lq1990717/article/details/112343594
https://www.runoob.com/python/python-for-loop.html
https://www.jb51.net/article/68962.htm
python 快速幂算法
http://www.javashuo.com/article/p-nmpvpwxf-q.html
Python: 没有switch-case语句
https://www.cnblogs.com/baxianhua/p/9022319.html
Python实现快速幂取模
https://www.cnblogs.com/whason/p/10778090.html
https://blog.csdn.net/weixin_41955255/article/details/122570940
Python实现快速幂取模
https://www.cnblogs.com/whason/p/10778090.html
https://blog.csdn.net/ggdhs/article/details/90141960
https://blog.csdn.net/xiaolangmin/article/details/89487277
"""
s=1
a,b=map(int,input().split())
a%=7
i=0
while i<b:
s=(s*a)%7
i+=1
#print(s)
for k in range(7):
#print(k)
if s==k and k==0:
print("Sunday")
if s==k and k==1:
print("Monday")
if s==k and k==2:
print("Tuesday")
if s==k and k==3:
print("Wednesday")
if s==k and k==4:
print("Thursday")
if s==k and k==5:
print("Friday")
if s==k and k==6:
print("Saturday")
k+=1
参考:
信息学奥赛一本通 1083:计算星期几 | OpenJudge NOI 小学奥数 7831
https://blog.csdn.net/lq1990717/article/details/112343594
https://www.runoob.com/python/python-for-loop.html
https://www.jb51.net/article/68962.htm
python 快速幂算法
http://www.javashuo.com/article/p-nmpvpwxf-q.html
Python: 没有switch-case语句
https://www.cnblogs.com/baxianhua/p/9022319.html
Python实现快速幂取模
https://www.cnblogs.com/whason/p/10778090.html
https://blog.csdn.net/weixin_41955255/article/details/122570940
Python实现快速幂取模
https://www.cnblogs.com/whason/p/10778090.html
https://blog.csdn.net/ggdhs/article/details/90141960
https://blog.csdn.net/xiaolangmin/article/details/89487277
标签:www,python,csdn,https,article,7831,net,com,奥数 来源: https://blog.csdn.net/dllglvzhenfeng/article/details/122589467