結果

問題 No.3420 Letter Loading
コンテスト
ユーザー るるまるふぁんくらぶ
提出日時 2026-01-11 13:38:00
言語 PyPy3
(7.3.17)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 372 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 157 ms
コンパイル使用メモリ 82,236 KB
実行使用メモリ 64,316 KB
最終ジャッジ日時 2026-01-11 14:01:25
合計ジャッジ時間 1,225 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import groupby

N, W, H = [int(s) for s in input().split()]
S = [s for s in input()]

rle = [(s, len(list(lis))) for s, lis in groupby(S)]

answer = [["x"] * W for _ in range(H)]

j = 0

for s, cnt in rle:
    if s == "l":
        continue

    for i in range(cnt):
        answer[H - i - 1][j] = "o"

    j += 1

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