英语翻译This assignment involves two related games.In each game the two players alternatelyname dates.The winner is the player who names 31st December and the starting dateis 1st January.Each of the two games use a different rule for the dates th
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 11:55:12
英语翻译This assignment involves two related games.In each game the two players alternatelyname dates.The winner is the player who names 31st December and the starting dateis 1st January.Each of the two games use a different rule for the dates th
英语翻译
This assignment involves two related games.In each game the two players alternately
name dates.The winner is the player who names 31st December and the starting date
is 1st January.
Each of the two games use a different rule for the dates the player is allowed to name.
For each game.
1.Devise a winning strategy,stating which player should win.State also if it
depends on whether the year is a leap year or not.
2.Write a pseudocode algorithm for optimum play.
The games are.
a.(Easy) A player can name the 1st of the next month or increase the day of
the month by an arbitrary amount.(For example,the first player begins by
naming 1st February or any date in January other than the 1st).
b.(Harder) A player can name the first of the next month or the next day of
the current month.(For example,the first player begins by naming 1st
February or 2nd January).
Hint:Look for patterns.Begin by looking at December dates.
英语翻译This assignment involves two related games.In each game the two players alternatelyname dates.The winner is the player who names 31st December and the starting dateis 1st January.Each of the two games use a different rule for the dates th
人工翻译.貌似是要编程?
这个作业包括两个相关的游戏.这两名玩家在游戏里交变地说日期.赢家是说出十二月三十一日日期的人.初始日期是是1月1日.
每个游戏中使用一个不同的对于该玩家允许说的日期的规则.
为每个游戏:
1.设计一种取胜战略,并告知哪位玩家会赢.并告知这是否取决于这一年是闰年.
2.为最佳玩法编写伪代码算法.
两个游戏是.
1.(容易)一个玩家名字在下个月1日或按自定的数量增加那个月的天数.(例如,第一个开始玩游戏的人以2月1日开始或在1月1日以外的任何日期).
2.(更难)一个玩家说第一个月内或该月第二天.(例如,第一个开始玩游戏的人以二月1日或于1月2日).
提示:寻找当中的模式.首先看12月日期.