HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🐣
프론트엔드 데브코스 4기 교육생
/
🍀
성기동팀
/
🐨
코테 스터디
/
최대최소

최대최소

풀이 날짜(Deadline)
Jul 18, 2023
링크
https://school.programmers.co.kr/learn/courses/30/lessons/12939
문제 유형
문자열
상태
Done

풀이

김영준
function solution(s) { const num = s.split(" ").map((n) => +n); return `${Math.min(...num)} ${Math.max(...num)}`; }
이종현
function solution(s) { return `${Math.min(...s.split(' '))} ${Math.max(...s.split(' '))}`; }
박노철
function solution(s) { // s=s.split(" ").map(i=>+i); // return `${Math.min(...s)} ${Math.max(...s)}`; const arr = s.split(' '); // return Math.min(...arr)+' '+Math.max(...arr); }
이민희
function solution(s) { const numbers = s.split(' ').map(str => +str) return [Math.min(...numbers), Math.max(...numbers)].join(' ') }
박건우
function solution(s) { const numbers = s.split(" ").map(v => +v); const maxNum = Math.max(...numbers); const minNum = Math.min(...numbers); return `${minNum} ${maxNum}`; }
박주연
function solution(s) { const arr = s.split(' '); return Math.min(...arr)+' '+Math.max(...arr); }