题目描述
思路代码Python1234567891011121314word = input()V = ["A", "O", "Y", "E", "U", "I"]# deletes all the vowelsword = ''.join(c for c in word if c.upper() not in V)# replaces all uppercase consonants wi...
题目描述
思路对于每一行命令检测+是否在里面就好。
代码Python123456789n = int(input())x=0for _ in range(n): op = input() if "+" in op: x += 1 else: x -= 1print(x)
C1234567891011121314151617181920#inclu...
题目描述
一共有 n 道题目,而对于每道题,他们会选择是否去做这题:只有当三个人中至少有两个人对这题有把握时,他们才会决定去做。
思路直接计算每行的和是否大于等于2。
代码Python123456789n = int(input()) count = 0 for _ in range(n): a, b, c = map(int, input().split()) if a ...