https://www.acmicpc.net/problem/9093
const fs = require('fs');
const input = fs.readFileSync('/dev/stdin').toString().split("\n");
const N = Number(input[0])
for(let i = 1 ; i <= N ; i++) {
const string = input[i].split(" ");
string.forEach((s, index) => {
const tmp = s.split("");
tmp.reverse();
string[index] = tmp.join("");
});
console.log(string.join(" "));
};
728x90
'Algorithm\CodingTest > Baekjoon' 카테고리의 다른 글
[Beakjoon] [1181] 단어 정렬 (0) | 2023.02.11 |
---|---|
[Baekjoon] [1712] 손익분기점 (0) | 2023.02.11 |
[Baekjoon] [10808] 알파벳 개수 (0) | 2023.02.10 |
[Baekjoon] [2744] 대소문자 바꾸기 (0) | 2023.02.10 |
[Baekjoon] [2750] 수 정렬하기 (0) | 2023.02.09 |