結果

問題 No.565 回転拡大
ユーザー kichirb3kichirb3
提出日時 2018-03-24 12:50:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,040 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 11,008 KB
実行使用メモリ 8,384 KB
最終ジャッジ日時 2023-09-07 08:25:08
合計ジャッジ時間 2,459 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,244 KB
testcase_01 AC 16 ms
8,372 KB
testcase_02 WA -
testcase_03 AC 16 ms
8,204 KB
testcase_04 AC 16 ms
8,216 KB
testcase_05 AC 15 ms
8,312 KB
testcase_06 AC 15 ms
7,808 KB
testcase_07 AC 16 ms
8,332 KB
testcase_08 AC 17 ms
8,324 KB
testcase_09 AC 17 ms
8,260 KB
testcase_10 AC 16 ms
8,220 KB
testcase_11 AC 16 ms
8,260 KB
testcase_12 AC 16 ms
8,168 KB
testcase_13 AC 17 ms
8,364 KB
testcase_14 AC 16 ms
8,216 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 17 ms
8,228 KB
testcase_19 AC 16 ms
8,188 KB
testcase_20 AC 15 ms
8,248 KB
testcase_21 AC 17 ms
7,768 KB
testcase_22 AC 16 ms
8,312 KB
testcase_23 AC 16 ms
8,144 KB
testcase_24 WA -
testcase_25 AC 16 ms
8,348 KB
testcase_26 WA -
testcase_27 AC 16 ms
8,284 KB
testcase_28 AC 16 ms
8,264 KB
testcase_29 AC 16 ms
8,004 KB
testcase_30 AC 16 ms
8,204 KB
testcase_31 AC 16 ms
8,148 KB
testcase_32 AC 17 ms
8,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.565 回転拡大
https://yukicoder.me/problems/no/565

"""
import sys
from sys import stdin
input = stdin.readline


def rotate_pict(R, pict):
    H = len(pict)
    W = len(pict[0])
    if R == 90 or R == 270:
        H, W = W, H
    rpict = [['.']* W for _ in range(H)]

    for y in range(H):
        for x in range(W):
            if R == 0:
                rpict[y][x] = pict[y][x]
            elif R == 180:
                rpict[y][x] = pict[y][W-x-1]
            elif R == 90:
                rpict[y][x] = pict[W-x-1][y]
            elif R == 270:
                rpict[y][x] = pict[x][H-y-1]
    return rpict


def main(args):
    R, K = map(int, input().split())
    H, W = map(int, input().split())
    pict = []
    for _ in range(H):
        pict.append(list(input().strip()))

    rpict = rotate_pict(R, pict)
    for row in rpict:
        for i in range(K):
            for r in row:
                print(r * K, end='')
            print()



if __name__ == '__main__':
    main(sys.argv[1:])
0