您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

7 行
198B

  1. ans1 = 0
  2. ans2 = 0
  3. for line in data_file.read_text().splitlines():
  4. a, b, c = sorted(map(int, line.split('x')))
  5. ans1 += 2 * (a * b + b * c + a * c) + a * b
  6. ans2 += a * b * c + 2 * (a + b)