Submission #3965212


Source Code Expand

<?php

fscanf(STDIN, "%d", $n);
for ($i = 0; $i < $n; $i++) {
    fscanf(STDIN, '%s', $s[]);
}

$new = [];

$x = $n;
foreach ($s as $row) {
    $x--;
    $s_row = str_split($row);
    for ($y = 0; $y < $n; $y++) {
        $new[$x][$y] = $s_row[$y];
        //    echo '$x='.$x.' $y='.$y.'val='.$s_row[$y]."\n";
    }
}


for ($i = 0; $i < $n; $i++) { //y
    $str = '';
    for ($j = 0; $j < $n; $j++) { // x
        $str .= $new[$j][$i];
    }
    echo $str . "\n";
}

Submission Info

Submission Time
Task B - 回転
User uenou
Language PHP7 (7.0.15)
Score 100
Code Size 494 Byte
Status AC
Exec Time 10 ms
Memory 4604 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 11
Set Name Test Cases
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt
Case Name Status Exec Time Memory
000.txt AC 10 ms 4604 KB
001.txt AC 10 ms 4604 KB
002.txt AC 10 ms 4604 KB
003.txt AC 10 ms 4604 KB
004.txt AC 10 ms 4604 KB
005.txt AC 10 ms 4604 KB
006.txt AC 10 ms 4604 KB
007.txt AC 10 ms 4604 KB
008.txt AC 10 ms 4604 KB
009.txt AC 10 ms 4604 KB
010.txt AC 10 ms 4604 KB