牛客网华为机试题之Python解法 第1题 字符串最后一个单词的长度 a = input().split(" ") print(len(a[-1])) 第2题 计算字符个数 a = input() b = input() print(a.lower().count(b.lower())) 第3题 明明的随机数 while True: try: num = int(input()) data = [] for i in range(num): data.append(int(input(…
http://blog.sina.com.cn/s/blog_3e66af4601016ela.html War unlikely, but Koreans still on cliff edge 战争的可能性不大,但是朝韩两国依然很危险 Will a second Korean war break out? Probably not, though the most intense tensions on the peninsular since the sinking of the Cheo…
2013-6-8 1. To ensure its sustained progress in economy, the government has _______ a series of policies. A. edited B. issued C. delivered D. shed 做题的步骤,看懂句子,根据猜的词义选择 为了确保经济持续的进步,政府颁布了一系列的政策…
http://blog.sina.com.cn/s/blog_3e66af4601016udh.html Protecting the weakest保护最弱势群体The recession may hurt America’s vulnerable children经济危机可能会危害美国弱小的儿童OVER the past few years, a growing number of America’s parentless children have found homes. In 2008…
http://blog.sina.com.cn/s/blog_3e66af46010170ma.html America's European moment美国的欧洲时刻 The troubling similarities between the fiscal mismanagement in Washington and the mess in the euro zone华盛顿的财政处置失当与欧元区的混乱不堪有着令人不安的相似之处 FOR the past three years Ameri…
http://blog.sina.com.cn/s/blog_3e66af4601016pkh.html Why hasn’t doubt over poisoning subsided? 公众对于朱令中毒案的怀疑为何不能平息? Yesterday, the Beijing police responded to public questions regarding the thallium poisoning of Zhu Ling, pointing out that they first…
http://blog.sina.com.cn/s/blog_3e66af4601015z0n.html Bird flu cases test government transparency 禽流感疫情考验政府的透明度 According to China's health authorities, two Shanghai men have died from H7N9 bird flu and one woman from Anhui Province and another four f…
Time limit per test: 1.0 seconds Memory limit: 256 megabytes 在进行某些桌游,例如 UNO 或者麻将的时候,常常会需要随机决定从谁开始.骰子是一种好方案.普通的骰子有六个面,分别是一点.二点.三点.四点.五点.六点,六面向上的概率相同.由于骰子只能产生六种情况,而实际桌游时,却常常有三到四人,所以,我们在掷骰子时,常常采用两颗骰子,这个「随机的选择」就由骰子向上点数之和直接决定. 我们采用这么一种方案,将向上点数之和对 p(人数)取模,…