You are on page 1of 6

E

COMP6047 – Algorithm and Programming

T
T
NO
BU
Jojo Bizarre Eyes
Jojo just bought a painting. Since Jojo has bizarre eyes, his vision is rotated 90 degrees
to the right. You as a programmer are required to create a simulation of Jojo’s vision.

I
Format Input

R
O
The first line of input consists of an integer S, denoting the size of the painting. Note
that the painting has the same width and height. The next inputs consist of characters
T
in a S x S structure, denoting the painting visualization.
D

Format Output
S
Print the painting by what Jojo sees, line-by-line.
DI

Do not forget to append a newline at the end of each output.

Constraints
OT
UT
• 1 ≤ S ≤ 128
RE

N
IB
TR
DO
IS
ED

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Sample Input 1 (standard input)


16
@@@@@@@@@@@@@@@@
@ @
@ ##### @
@ # @
@ # @
@ # @
@ # @
@ @
@ @
@ @
@ ### @
@ # @
@ @
@ # @
@ @
@@@@@@@@@@@@@@@@

Sample Output 1 (standard output)


@@@@@@@@@@@@@@@@
@ @
@ @
@ # @
@ @
@ @
@ @
@ @
@ # # @
@ # # @
@ # ## @
@ # @
@ ##### @
@ @
@ @
@@@@@@@@@@@@@@@@

Sample Input 2 (standard input)

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

16
@@@@@@@@@@@@@@@@
@ @
@ OOO @
@ O O @
@ OOO @
@ O @
@ OOOOO @
@ O @
@ O @
@ O @
@ O O @
@ O O @
@ @
@ @
@ @
@@@@@@@@@@@@@@@@

Sample Output 2 (standard output)


@@@@@@@@@@@@@@@@
@ @
@ @
@ @
@ @
@ O O O @
@ O O O O @
@ O OOOOOO @
@ O O O O @
@ O O O @
@ @
@ @
@ @
@ @
@ @
@@@@@@@@@@@@@@@@

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Jojo Bizarre Eyes


Jojo baru saja membeli lukisan. Karena Jojo memiliki mata yang aneh, pandangan dia
berputar 90 derajat ke kanan. Anda sebagai programmer diharuskan untuk menciptakan
simulasi dari pandangan Jojo.

Format Input
Baris pertama dari input terdiri dari sebuah integer S, yang merupakan ukuran lukisan.
Perhatikan bahwa lukisan tersebut memiliki lebar dan tinggi yang sama. input-input
berikutnya terdiri dari karakter-karakter pada struktur S x S, yang merupakan visualisasi
lukisan tersebut.

Format Output
Cetak lukisan berdasarkan apa yang dilihat Jojo, baris per-baris.

Jangan lupa menambahkan baris baru di akhir setiap output.

Constraints
• 1 ≤ T ≤ 128

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Sample Input 1 (standard input)


16
@@@@@@@@@@@@@@@@
@ @
@ ##### @
@ # @
@ # @
@ # @
@ # @
@ @
@ @
@ @
@ ### @
@ # @
@ @
@ # @
@ @
@@@@@@@@@@@@@@@@

Sample Output 1 (standard output)


@@@@@@@@@@@@@@@@
@ @
@ @
@ # @
@ @
@ @
@ @
@ @
@ # # @
@ # # @
@ # ## @
@ # @
@ ##### @
@ @
@ @
@@@@@@@@@@@@@@@@

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.
COMP6047 – Algorithm and Programming

Sample Input 2 (standard input)


16
@@@@@@@@@@@@@@@@
@ @
@ OOO @
@ O O @
@ OOO @
@ O @
@ OOOOO @
@ O @
@ O @
@ O @
@ O O @
@ O O @
@ @
@ @
@ @
@@@@@@@@@@@@@@@@

Sample Output 2 (standard output)


@@@@@@@@@@@@@@@@
@ @
@ @
@ @
@ @
@ O O O @
@ O O O O @
@ O OOOOOO @
@ O O O O @
@ O O O @
@ @
@ @
@ @
@ @
@ @
@@@@@@@@@@@@@@@@

© School of Computer Science - BINUS, 2020. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
For those who violated this disclaimer, academic sanctioned can be enforced.

You might also like