You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4 년 전
4 년 전
123456
  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)