a = int(input()) b = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u'] for i in range(a): c = str(input()) d = 0 for j in b: if (c[len(c)-1] == j): d = 1 if (c[len(c)-1] == 'y'): d = 2 if (c[len(c)-1] == 'Y'): d = 2 if d == 1: print('Case #' + str(i+1) + ': '+c+' is ruled by Alice.') elif d == 0: print('Case #' + str(i+1) + ': '+c+' is ruled by Bob.') else: print('Case #' + str(i+1) + ': '+c+' is ruled by nobody.')
a = int(input()) b = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u'] for i in range(a): c = str(input()) d = 0 for j in b: if (c[len(c)-1] == j): d = 1 if (c[len(c)-1] == 'y'): d = 2 if (c[len(c)-1] == 'Y'): d = 2 if d == 1: print('Case #' + str(i+1) + ': '+c+' is ruled by Alice.') elif d == 0: print('Case #' + str(i+1) + ': '+c+' is ruled by Bob.') else: print('Case #' + str(i+1) + ': '+c+' is ruled by nobody.')
垃圾?
a = int(input()) b = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u'] for i in range(a): c = str(input()) d = 0 for j in b: if (c[len(c)-1] == j): d = 1 if (c[len(c)-1] == 'y'): d = 2 if (c[len(c)-1] == 'Y'): d = 2 if d == 1: print('Case #' + str(i+1) + ': '+c+' is ruled by Alice.') elif d == 0: print('Case #' + str(i+1) + ': '+c+' is ruled by Bob.') else: print('Case #' + str(i+1) + ': '+c+' is ruled by nobody.')
垃圾?
answer