Algorithm

[BOJ/C#] 11945 뜨거운 붕어빵

일등하이 2023. 2. 2. 14:09
반응형

https://www.acmicpc.net/problem/11945

 

11945번: 뜨거운 붕어빵

입력으로 주어지는 각 행을 반전시켜서 출력하면 됩니다. 입력의 1행 1열은 출력의 1행 M열로, 입력의 1행 2열은 출력의 1행 M-1열로 … 입력의 1행 M열은 출력의 1행 1열로 … 입력의 N행 M열은 출력

www.acmicpc.net

using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

namespace BOJ
{
    class Program
    {
        static void Main(string[] args)
        {
            StreamReader sr = new StreamReader(new BufferedStream(Console.OpenStandardInput()));
            StreamWriter sw = new StreamWriter(new BufferedStream(Console.OpenStandardOutput()));

            int[] nm = Array.ConvertAll(sr.ReadLine().Split(), int.Parse);
            int n = nm[0];
            
            for (int i = 0; i < n; i++)
            {
                var str = sr.ReadLine();
                sw.WriteLine(new string(str.Reverse().ToArray()));
            }

            sr.Close();
            sw.Close();


        }

    }
}
반응형