寒假翻译题训练 2月7号

链接:​​​​​​https://acs.jxnu.edu.cn/problem/HDU1015

题目:

描述:

=== Op tech briefing, 2002/11/02 06:42 CST ===
"The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in World War II. Fortunately old Brumbaugh from research knew Klein's secrets and wrote them down before he died. A Klein safe has two distinguishing features: a combination lock that uses letters instead of numbers, and an engraved quotation on the door. A Klein quotation always contains between five and twelve distinct uppercase letters, usually at the beginning of sentences, and mentions one or more numbers. Five of the uppercase letters form the combination that opens the safe. By combining the digits from all the numbers in the appropriate way you get a numeric target. (The details of constructing the target number are classified.) To find the combination you must select five letters v, w, x, y, and z that satisfy the following equation, where each letter is replaced by its ordinal position in the alphabet (A=1, B=2, ..., Z=26). The combination is then vwxyz. If there is more than one solution then the combination is the one that is lexicographically greatest, i.e., the one that would appear last in a dictionary."

v - w^2 + x^3 - y^4 + z^5 = target

"For example, given target 1 and letter set ABCDEFGHIJKL, one possible solution is FIECB, since 6 - 9^2 + 5^3 - 3^4 + 2^5 = 1. There are actually several solutions in this case, and the combination turns out to be LKEBA. Klein thought it was safe to encode the combination within the engraving, because it could take months of effort to try all the possibilities even if you knew the secret. But of course computers didn't exist then."

=== Op tech directive, computer division, 2002/11/02 12:30 CST ===

"Develop a program to find Klein combinations in preparation for field deployment. Use standard test methodology as per departmental regulations. Input consists of one or more lines containing a positive integer target less than twelve million, a space, then at least five and at most twelve distinct uppercase letters. The last line will contain a target of zero and the letters END; this signals the end of the input. For each line output the Klein combination, break ties with lexicographic order, or 'no solution' if there is no correct combination. Use the exact format shown below."

翻译如下

描述:

=== OP技术简报, 2002/11/02 06:42 CST ===

“目标被锁在图书馆二楼一幅画背后的Klein保险柜里,Klein保险柜极为罕见,大多数保险柜和生产其的工厂都在二战中被摧毁了。幸运的是,从事研究工作的老Brumbaugh知道Klein保险柜的秘密,并且他生前将这些秘密纪录了下来。一个Klein保险柜有两个明显的特征:”其使用了字母密码锁而非数字密码锁,并且在门上有刻着的文字。Klein保险柜上的文字总是包含着5~12个不同的大写字母,其通常在句子的开头,其中会提到一个或者更多的数字。有五个大写字母构成了打开保险柜的密码。通过排列组合所有的数字你就可以得到一个数字目标(过程的细节是保密的)。为了找到这个密码你必须选择五个字母 v, w, x, y, 和 z,并满足一下方程,其中每个字母要替换为其在字母表的顺序位置 (A=1, B=2, ..., Z=26)。密码为vwxyz。如果存在多组密码解,那么这个解就是字典上最好的解,这个也是字典里面最后的解。”

v - w^2 + x^3 - y^4 + z^5 = target

“比如,给定一个目标1和字母序列ABCDEFGHIJKL,一个可能的密码解是FIECB,因为6 - 9^2 + 5^3 - 3^4 + 2^5 = 1,当然,实际上这有好几组密码解,结合起来就是LKEBA,Klein认为在雕刻时对密码进行重新编码是安全的,因为即使你知道Klein保险柜的秘密,你依旧要尝试几个月来暴力破解密码。当然,那个时候计算机还没发明出来”
=== OP技术指令, 计算机部门, 2002/11/02 12:30 CST ===
“请编写一个程序来寻找Klein密码解,为现场部署做准备。请按照部门规定的来使用标准的测试方法。输入包含一组或多组样例,对于每组样例应包含一个小于1200万的正整数目标,一个空格,一组字母序列(包含5~12不同的大写字母),当输入0作为目标以及字母序列END时,输入终止。对于每组输出的Klein密码,用字典序打破关系,如果没有正确的密码解,则输出 'no solution',请按照以下格式输出结果”
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值