stopword = ‘‘ str = ‘‘ for line in iter(raw_input,stopword): str += line + ‘\n‘ L = str.strip().split(‘\n‘) L_num = [] for c in L: L_num.append(int(c)) L_down = L_num[:] L_up = L_num[:] L_down.sort(reverse = 1) L_up.sort() print ‘L_down=‘,L_down print ‘L_up=‘,L_up if L_num == L_down: print "DOWN" elif L_num == L_up: print "UP" else: print "WRONG"
时间: 2024-10-26 12:26:39