编码操练招式——网球计分
来源:互联网 发布:制作课件的软件 编辑:程序博客网 时间:2024/04/30 07:49
网球计分
1)如果第一位选手总共赢了至少4个球(Point),并且至少比对手多赢2个球,那么这位选手就赢了一局(Game)。
2)每一局的计分用网球界特有的方式来统计:赢0、1、2、3个球,分别计0、15、30、40分。
3)如果每位选手都已经赢了至少3个球,且得分相同,那么每位选手就称为“平分(Deuce)”。
4)如果每位选手都已经赢了至少3个球,并且其中一位选手比对方多赢1球,那么该选手称为“领先(advantage)”。
15,30,40分的由来
网球是在十四世纪起源于法国路易斯王朝时代,在宫廷中举行的"jeude paume"(意为"用手掌击球的游戏")。后来在十九世纪引进英国,改良在草皮上举行。 因为最原始的网球运动是起源于宫廷之中,所以计分方法就地取材是可以理解的。他们拿可以拨动的时钟来计分,每得一次分就将时钟转动四分之一,也就是15分(aquarter,一刻),同理,得两次分就将时钟拨至30分,当然一切都是以他们的方便为基础。这就是15分、30分的由来。 至于40分,它比较怪异,它不是15的倍数。这是因为在英文中,15分念作"fifteen",为双音节,而30分念作"thirty",也是双音节;但是45分,英文念作"forty-five",变成了三个音节,当时着英国人觉得有点拗口,也不符合"方便"的原则,于是就把它改成同为双音节的40分(forty)。这就是看来不合逻辑的40分的由来。
You task is to implement a tennis scoring program.
Summary of tennis scoring:
1. A game is won by the first player to have won at least four points in total and at least two points more than the opponent.
2. The running score of each game is described in a manner peculiar to tennis: scores from zero to three points are described as "love", "fifteen", "thirty", and "forty" respectively.
3. If at least three points have been scored by each player, and the scores are equal, the score is "deuce".
4. If at least three points have been scored by each side and a player has one more point than his opponent, the score of the game is "advantage" for the player in the lead.
1)如果第一位选手总共赢了至少4个球(Point),并且至少比对手多赢2个球,那么这位选手就赢了一局(Game)。
2)每一局的计分用网球界特有的方式来统计:赢0、1、2、3个球,分别计0、15、30、40分。
3)如果每位选手都已经赢了至少3个球,且得分相同,那么每位选手就称为“平分(Deuce)”。
4)如果每位选手都已经赢了至少3个球,并且其中一位选手比对方多赢1球,那么该选手称为“领先(advantage)”。
15,30,40分的由来
网球是在十四世纪起源于法国路易斯王朝时代,在宫廷中举行的"jeude paume"(意为"用手掌击球的游戏")。后来在十九世纪引进英国,改良在草皮上举行。 因为最原始的网球运动是起源于宫廷之中,所以计分方法就地取材是可以理解的。他们拿可以拨动的时钟来计分,每得一次分就将时钟转动四分之一,也就是15分(aquarter,一刻),同理,得两次分就将时钟拨至30分,当然一切都是以他们的方便为基础。这就是15分、30分的由来。 至于40分,它比较怪异,它不是15的倍数。这是因为在英文中,15分念作"fifteen",为双音节,而30分念作"thirty",也是双音节;但是45分,英文念作"forty-five",变成了三个音节,当时着英国人觉得有点拗口,也不符合"方便"的原则,于是就把它改成同为双音节的40分(forty)。这就是看来不合逻辑的40分的由来。
(来源:http://baike.baidu.com/view/556970.htm)
You task is to implement a tennis scoring program.
Summary of tennis scoring:
1. A game is won by the first player to have won at least four points in total and at least two points more than the opponent.
2. The running score of each game is described in a manner peculiar to tennis: scores from zero to three points are described as "love", "fifteen", "thirty", and "forty" respectively.
3. If at least three points have been scored by each player, and the scores are equal, the score is "deuce".
4. If at least three points have been scored by each side and a player has one more point than his opponent, the score of the game is "advantage" for the player in the lead.
[source http://en.wikipedia.org/wiki/Tennis#Scoring]
- 编码操练招式——网球计分
- 编码操练招式——康威生命游戏
- 网球计分
- [重构到模式-State Pattern]把网球计分招式重构到状态模式
- 网球计分方法
- 网球计分系统
- 操练
- 操练
- 第九周—大奖赛计分
- 第九周—大奖赛计分
- 网球
- 时间盒自由技法编码操练
- 保龄球计分——java代码实现
- 第九周OJ——大奖赛计分
- 程序设计大赛—保龄球计分系统
- 第十周项目四—大奖赛计分
- 寒假实践之—大奖赛计分系统
- 从招式与内功谈起——设计模式概述
- 直接删除undo及temp表空间文件后的数据库恢复一例
- linux 时钟
- ubuntu搭建git服务器和心得体会
- CKeditor的引用
- CCNA学习笔记1
- 编码操练招式——网球计分
- 使用netstat和awk命令来统计网络连接数
- 表达式计算引擎
- hdu 2553 N皇后问题
- c++ 16进制转化为10进制的几种方法
- Qt C++ command模式(类似qt的信号槽)
- IP地址查询接口及调用方法
- 论文部分代码
- 各种银行的接口参数代码