本文主要是介绍【科赛网15天培训】前期准备,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
选择错题
#[题目链接](https://www.icourse163.org/learn/NJU-1001571005?tid=1002701006#/learn/ojhw?id=1003423011)
def find_person(dict_users, strU):if strU in dict_users:return dict_users[strU]else:return 'Not Found'
if __name__ == "__main__":dict_users={'xiaoyun':88888,'xiaohong':5555555,'xiaoteng':11111,'xiaoyi':12341234,'xiaoyang':1212121}strU = input()print(find_person(dict_users, strU))
#[题目链接](https://www.icourse163.org/learn/NJU-1001571005?tid=1002701006#/learn/ojhw?id=1003423011)
def countfeq(s): s_list = s.split('/')p = []for i in range(0,len(s_list)):if s_list[i] is not '.' and s_list[i] is not ',':p.append(s_list[i])t = dict.fromkeys(p, 0)for i in range(0,len(p)): t[p[i]] += 1return t
if __name__ == "__main__":s = input()s_dict = countfeq(s)print(len(s_dict.keys()))
这篇关于【科赛网15天培训】前期准备的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!