0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AtCoder Beginner Contest 296B - Chessboardメモ

Posted at

問題

AtCoder Beginner Contest 296

考察

二次元配列として入力を受け取り、もしa[i][j]*であるならば8-iを文字列したものとアルファベット列abcdefghi文字目を出力する。iの挙動は縦に、jの挙動は横にいくことに注意する。

ACコード


def check(a,al):
    for i in range(8):
        for j in range(8):
            if a[i][j] == "*":
                return al[j]+str(8-i)
a = [list(input()) for _ in range(8)]
al = "abcdefgh"

print(check(a,al))
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?