HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🤎
프론트엔드 데브코스 5기 교육생
/
🐥
김은수팀
/
🏆
16주차 : 기업 코테 딱대
/
2. 폴리오미노

2. 폴리오미노

고른사람
승민
URL
https://www.acmicpc.net/problem/1343
난이도
실버5

민수 풀이

재현 풀이

송희 풀이

const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().trim() + "."; let result = []; while (input.length != 0) { let dotIndex = input.indexOf("."); if (dotIndex == 0) { result.push(""); input = input.substring(1); continue; } let bCount = dotIndex % 4; if (bCount % 2 != 0) return console.log(-1); let aCount = parseInt(dotIndex / 4); result.push("AAAA".repeat(aCount) + "BB".repeat(bCount / 2)); input = input.substring(dotIndex + 1); } console.log(result.join("."));

승민 풀이