백준 #백준25325번 #javascript #node.js
-
[백준 / javascript] 25325번 학생 인기도 측정알고리즘 2023. 3. 31. 13:55
https://www.acmicpc.net/problem/25325 25325번: 학생 인기도 측정 학생 이름이 공백으로 구분된 문자열 A가 주어진다. 문자열 A에는 중복된 학생 이름이 존재하지 않는다. 학생 이름은 알파벳 소문자로 이루어져 있다. 각 학생이 좋아하는 학생의 학생 이름 목록 www.acmicpc.net // 25325 : 학생 인기도 측정 const readFile = 'dev/stdin'; const input = require('fs') .readFileSync(readFile) .toString() .trim() .split('\\n'); const n = input.shift(); const student = input.shift().split(' '); let obj = {}; ..