結果
| 問題 |
No.565 回転拡大
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-07 22:02:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 515 bytes |
| コンパイル時間 | 413 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-07 06:14:00 |
| 合計ジャッジ時間 | 2,529 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 21 |
ソースコード
#!/usr/bin/env python3
def rotate(s):
h = len(s)
w = len(s[0])
return [ [ s[y][x] for y in range(h) ] for x in range(w) ]
def scale(xs, k):
ys = []
for x in xs:
ys += [ x ] * k
return ys
r, k = map(int, input().split())
h, w = map(int, input().split())
image = [ list(input()) for y in range(h) ]
for _ in range(0, r, 90):
image = rotate(image)
for y in range(len(image)):
image[y] = scale(image[y], k)
image = scale(image, k)
for line in image:
print(*line, sep='')