- 1、本文档共10页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
华南农业大学 2009 ACM题目
6754?Keyboard of a Mobile Telephone
时间限制:500MS? 内存限制:1000K提交次数:0 通过次数:0
题型: 编程题???语言: 无限制
描述
Now almost every student has a mobile telephone. But do you have making attention to the keyboard of a mobile telephone? This is the keyboard of a normal mobile telephone:
It will show different letters if you press one key different times, for example you press the key “2” once it will show a letter ‘a’, twice show a ‘b’. And notice that press the key ‘0’ once will show a space. Now give you a sentence, which contains only lowercases and space, calculate how much times to press the keyboard at least to show the sentence.
Input
The first line contains an integer n, which means the number of cases. Per case consist of only one sentence, which contains only lowercases and spaces and its length less or equal 200.
Output
Per case output an integer, which is the least times to press the keyboard, in one line.
Sample Input
1
this problem is so easy
Sample Output
53
Source
By Hanqiu
6755?Right-angled Triangle
时间限制:612MS? 内存限制:1000K提交次数:0 通过次数:0
题型: 编程题???语言: 无限制
描述
Right-angled triangle is very important in plane geometry, just as the primes in numeral system. Now there is an interesting problem about right-angled triangle. As we all know, if we choose three points in a coordinate system and these points according to some conditions, they can form a right-angled triangle. And there is an example in the picture: the △OPQ forms a right-angled triangle.
If give a integer n, there are many ways to choose two points that according three condition: 1) each co-ordinate is integer 2) lies between 0 and n inclusive, that is 0 = x1, y1, x2, y2 = n, 3) the two points and the origin point can form a right-angled triangle. And the following picture is one example which n = 2, and it shows that there are 14 different ways to choose two points to forms a right-angled triangle with origin point
And this is the problem, give you a integer n, you should calculate how many ways to choose tw
您可能关注的文档
最近下载
- 必威体育精装版非计划再次手术登记表.docx VIP
- 专题1.11 探索三角形全等的条件(HL)(分层练习)-2023-2024学年八年级数学上册基础知识专项突破讲与练(苏科版).docx VIP
- 食源性疾病暴发事件应急处置技术方案.doc VIP
- 2013造价实训案例第六题通用安装电气及自动化工程电气设备照明.pdf
- 2024跟踪光伏支架技术规范.docx
- 湘文艺版 五年级音乐上册第4课《(演唱)祖国印象》教学设计.doc
- 2024届各地必威体育精装版模考语言文字运用新题(精选20题)教师版公开课教案教学设计课件资料.docx VIP
- 专题1.22 全等三角形几何模型(一线三垂直)(分层练习)(综合练)-2023-2024学年八年级数学上册基础知识专项突破讲与练(苏科版).docx VIP
- 罐头装箱机的设计毕业设计论文.doc
- 作业的布置-批改.ppt VIP
文档评论(0)