NP58. 找到HR
描述
输入描述
无输出描述
Python 解法, 执行用时: 9ms, 内存消耗: 2844KB, 提交时间: 2022-07-02
user_list = ['Niuniu','Niumei','HR','Niu Ke Le','GURR' ,'LOLO'] for i in user_list: if i=='HR': print("Hi, HR! Would you like to hire someone?") else: print( 'Hi, {}! Welcome to Nowcoder!'.format(i))
Python 解法, 执行用时: 10ms, 内存消耗: 2824KB, 提交时间: 2022-08-01
# user_list = ['Niuniu','Niumei','HR','Niu Ke Le','GURR','LOLO'] # for user in user_list: # if user == "HR": # print('Hi, %s! Would you like to hire someone?'%user) # else: # print('Hi, %s Welcome to Nowcoder!'%user) users_list = ['Niuniu', 'Niumei', 'HR', 'Niu Ke Le', 'GURR', 'LOLO'] for i in users_list: if i == "HR": print('Hi, %s! Would you like to hire someone?' % i) else: print('Hi, %s! Welcome to Nowcoder!' % i)
Python 解法, 执行用时: 10ms, 内存消耗: 2836KB, 提交时间: 2022-06-30
user_list = ['Niuniu', 'Niumei', 'HR', 'Niu Ke Le', 'GURR', 'LOLO'] for i in user_list: if i == 'HR': print 'Hi, HR! Would you like to hire someone?' else: print 'Hi, ' + i + '! Welcome to Nowcoder!'
Python 解法, 执行用时: 10ms, 内存消耗: 2836KB, 提交时间: 2022-06-28
users_list=('Niuniu','Niumei','HR','Niu Ke Le','GURR','LOLO') for user in users_list: if user=='HR': print("Hi, HR! Would you like to hire someone?") else: print("Hi, "+user+"! Welcome to Nowcoder!")
Python 解法, 执行用时: 10ms, 内存消耗: 2836KB, 提交时间: 2022-06-26
users_list=['Niuniu','Niumei','HR','Niu Ke Le','GURR', 'LOLO' ] for elem in users_list: if elem == 'HR': print('Hi, HR! Would you like to hire someone?') continue print('Hi, '+ elem + '! Welcome to Nowcoder!')