LoginSignup
1
0

More than 3 years have passed since last update.

ABC 088 C – Takahashi’s Information

Last updated at Posted at 2020-08-09

問題概要

考えたこと

c11, c12, c13 = a1+b1, a1+b2, a1+b3
c21, c22, c23 = a2+b1, a2+b2, a2+b3
c31, c32, c33 = a3+b1, a3+b2, a3+b3

よって

c11 + c22 + c33
= c12 + c23 + c31
= c13 + c32 + c21
= a1 + a2 + a3 + b1 + b2 + b3

提出コード

test.py
def solve():
    import sys
    s = list(map(int, sys.stdin.read().split()))
    x, y, z = s[0] + s[4] + s[8], s[1] + s[5] + s[6], s[2] + s[3] + s[7]
    if x == y == z:
        print("Yes")
    else:
        print("No")

    return
solve()

編集中

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0