結果

問題 No.455 冬の大三角
ユーザー 👑 rin204rin204
提出日時 2022-01-20 02:40:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 76,768 KB
最終ジャッジ日時 2023-08-15 08:20:21
合計ジャッジ時間 8,604 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,140 KB
testcase_01 AC 74 ms
71,452 KB
testcase_02 AC 75 ms
71,156 KB
testcase_03 AC 75 ms
71,400 KB
testcase_04 AC 75 ms
71,260 KB
testcase_05 AC 74 ms
71,364 KB
testcase_06 AC 73 ms
71,236 KB
testcase_07 AC 74 ms
71,244 KB
testcase_08 AC 86 ms
76,768 KB
testcase_09 AC 76 ms
71,292 KB
testcase_10 AC 74 ms
71,404 KB
testcase_11 AC 72 ms
71,284 KB
testcase_12 AC 74 ms
71,072 KB
testcase_13 AC 72 ms
71,172 KB
testcase_14 AC 72 ms
71,212 KB
testcase_15 AC 73 ms
71,420 KB
testcase_16 AC 72 ms
71,456 KB
testcase_17 AC 72 ms
71,196 KB
testcase_18 AC 72 ms
71,284 KB
testcase_19 AC 74 ms
71,212 KB
testcase_20 AC 73 ms
71,116 KB
testcase_21 AC 74 ms
71,204 KB
testcase_22 AC 72 ms
71,368 KB
testcase_23 AC 73 ms
71,140 KB
testcase_24 AC 73 ms
71,392 KB
testcase_25 AC 73 ms
71,424 KB
testcase_26 AC 74 ms
71,208 KB
testcase_27 AC 73 ms
71,256 KB
testcase_28 AC 72 ms
71,372 KB
testcase_29 AC 86 ms
76,572 KB
testcase_30 AC 85 ms
76,488 KB
testcase_31 AC 87 ms
76,668 KB
testcase_32 AC 86 ms
76,764 KB
testcase_33 AC 86 ms
76,672 KB
testcase_34 AC 75 ms
71,400 KB
testcase_35 AC 85 ms
76,712 KB
testcase_36 AC 83 ms
76,676 KB
testcase_37 AC 82 ms
76,488 KB
testcase_38 AC 83 ms
76,472 KB
testcase_39 AC 85 ms
76,628 KB
testcase_40 AC 85 ms
76,396 KB
testcase_41 AC 86 ms
76,668 KB
testcase_42 AC 84 ms
76,292 KB
testcase_43 AC 87 ms
76,580 KB
testcase_44 AC 83 ms
76,304 KB
testcase_45 AC 94 ms
76,660 KB
testcase_46 AC 86 ms
76,472 KB
testcase_47 AC 85 ms
76,288 KB
testcase_48 AC 83 ms
76,324 KB
testcase_49 AC 75 ms
71,068 KB
testcase_50 AC 71 ms
71,420 KB
testcase_51 AC 73 ms
71,288 KB
testcase_52 AC 75 ms
71,288 KB
testcase_53 AC 80 ms
75,196 KB
testcase_54 AC 75 ms
71,328 KB
testcase_55 AC 83 ms
76,328 KB
testcase_56 AC 74 ms
71,272 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