結果

問題 No.455 冬の大三角
ユーザー 👑 rin204rin204
提出日時 2022-01-20 02:40:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 64,512 KB
最終ジャッジ日時 2024-05-02 20:07:36
合計ジャッジ時間 5,289 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
51,584 KB
testcase_01 AC 41 ms
52,224 KB
testcase_02 AC 46 ms
52,480 KB
testcase_03 AC 43 ms
52,096 KB
testcase_04 AC 43 ms
51,840 KB
testcase_05 AC 43 ms
52,224 KB
testcase_06 AC 42 ms
52,096 KB
testcase_07 AC 43 ms
51,584 KB
testcase_08 AC 59 ms
64,512 KB
testcase_09 AC 42 ms
51,968 KB
testcase_10 AC 40 ms
51,712 KB
testcase_11 AC 41 ms
51,968 KB
testcase_12 AC 42 ms
51,840 KB
testcase_13 AC 42 ms
52,096 KB
testcase_14 AC 41 ms
51,968 KB
testcase_15 AC 41 ms
51,712 KB
testcase_16 AC 41 ms
51,968 KB
testcase_17 AC 41 ms
52,096 KB
testcase_18 AC 41 ms
51,968 KB
testcase_19 AC 40 ms
51,840 KB
testcase_20 AC 40 ms
51,712 KB
testcase_21 AC 41 ms
51,840 KB
testcase_22 AC 41 ms
52,096 KB
testcase_23 AC 41 ms
52,096 KB
testcase_24 AC 40 ms
51,712 KB
testcase_25 AC 41 ms
51,712 KB
testcase_26 AC 41 ms
52,096 KB
testcase_27 AC 41 ms
51,968 KB
testcase_28 AC 41 ms
51,968 KB
testcase_29 AC 57 ms
63,488 KB
testcase_30 AC 55 ms
62,848 KB
testcase_31 AC 57 ms
62,336 KB
testcase_32 AC 56 ms
62,208 KB
testcase_33 AC 56 ms
64,128 KB
testcase_34 AC 44 ms
52,224 KB
testcase_35 AC 56 ms
63,104 KB
testcase_36 AC 56 ms
62,592 KB
testcase_37 AC 58 ms
62,080 KB
testcase_38 AC 55 ms
62,208 KB
testcase_39 AC 58 ms
63,488 KB
testcase_40 AC 55 ms
62,720 KB
testcase_41 AC 55 ms
62,592 KB
testcase_42 AC 55 ms
61,824 KB
testcase_43 AC 55 ms
62,080 KB
testcase_44 AC 54 ms
61,440 KB
testcase_45 AC 63 ms
63,232 KB
testcase_46 AC 55 ms
62,848 KB
testcase_47 AC 57 ms
62,592 KB
testcase_48 AC 62 ms
61,696 KB
testcase_49 AC 45 ms
52,224 KB
testcase_50 AC 41 ms
52,224 KB
testcase_51 AC 42 ms
52,096 KB
testcase_52 AC 43 ms
52,864 KB
testcase_53 AC 47 ms
58,368 KB
testcase_54 AC 43 ms
52,480 KB
testcase_55 AC 53 ms
61,568 KB
testcase_56 AC 44 ms
52,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w = map(int, input().split())
S = [list(input()) for _ in range(h)]
lst = []
for i in range(h):
    for j in range(w):
        if S[i][j] == "*":
            lst.append((i, j))
            
a = lst[0]
b = lst[1]
if a[0] == b[0]:
    i = (a[0] + 1) % h
    j = a[1]
elif a[1] == b[1]:
    i = a[0]
    j = (a[1] + 1) % w
else:
    i = a[0]
    j = b[1]
S[i][j] = "*"

for row in S:
    print(*row, sep="")
0