PAT A1061 Dating (20分)坑比题!!!

说真的我英语阅读长期只错2、3个,读PAT的英文题常常读不明白,一方面我怀疑把题目翻译成英文的人英文水平不行;另一方面,PAT的英文题,就算请中文功底最好的翻译大家来翻译成中文,题目的中文表述都有歧义,因为题目的英文本身就信息残缺和有歧义。

就比如这道题:PAT A1061 Dating (20分)

前面这段废话不管,就知道有4个字符串
Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the coded time Thursday 14:04 --

从这里开始翻译和解析

since the first common capital English letter (case sensitive) shared by the first two strings is the 4th capital letter D, representing the 4th day in a week;

1.因为前两个字符串中共享的的共同大写字母(大小敏感)是第4个大写字母D,代表一周中的第四天

the second common character is the 5th capital letter E, representing the 14th hour (hence the hours from 0 to 23 in a day are represented by the numbers from 0 to 9 and the capital letters from A to N, respectively);

2.这第二个共用字母是第五个大写字母E,代表14小时(因此从0~9及A~N表示0~23小时)

and the English letter shared by the last two strings is s at the 4th position, representing the 4th minute. Now given two pairs of strings, you are supposed to help Sherlock decode the dating time.

最后一句话好理解,不翻了。

用string.find(str, pos)死活做不出来。

就想问问,从1.2这句话中怎么看出要找的共用字母在字符串中的同一个位置??

common ?? share??

con nm,share nm 的。

观察用例?

这是用例:

3485djDkxh4hhGE 

2984akDfkkkkggEdsb 

s&hgsfdk 

d&Hyscvnm

原来前两个字符串,相同字母真的在同一个位置哎!

在同一个位置又怎么样??这四个破烂字符串让人根本不想多看一眼,就算我看到了相同字母在相同位置又如何?题目中有清晰无误的说明吗,或者有略微一点点的暗示吗?

这不就是叫人猜吗,一道题出的不仅叫人会做还要会猜,有意思吗。看到没,这到题满分,赌上命做出来的。

更何况还要考虑到第一个相同(同一个位置)大写字母必须是A到G,第2个相同且相同位置的数字或大写字母必须在第一个的位置后面。

最后一个一直想吐槽的就是网上那么多破烂博客就把自己的代码往上一贴,不做任何说明,难道真以为会有人看他们代码一眼?那既然知道只有自己看,是电脑里放不下,还是网上博客不能设权限,非要放到公共区域,浪费别人在搜索引擎中搜索有价值信息的时间?

还有就是喜欢转载,或者截别人博客中的几句话,或者自己搞懂了一个小得不能再小的基础的知识点也要发篇博, 同前面说的一样,不会做笔记吗。

原文地址:https://www.cnblogs.com/shooting-gamer/p/13520242.html