LoginSignup
0
0

ABC188 解説

Last updated at Posted at 2023-08-10

ABC188解説

この記事は何

この記事は復習としてABC188を解説したものになります。

問題の解説

問題のリンクはこちら

A問題

A問題の公式解説のリンクはこちら

abc_312.py

B問題

B問題の公式解説のリンクはこちら
この問題はいわゆる「やるだけ問題」になります。いわれた通りに実装できればACがでる問題という意味。学びになる個所としては累算代入演算子を使って条件をfor文を通して判定していくところぐらいです。ちなみに内積を求めて0なら~とやってもかまいません。

abc_188_b.py
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ans = 0
for i in range(N):
    ans += A[i] * B[i]

if ans == 0:
    print("Yes")
else:
    print("No")

C問題

C問題の公式解説のリンクはこちら

abc_312.py

0
0
4

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
0
0