티스토리 뷰
https://www.acmicpc.net/problem/1037
const fs = require('fs');
const input = fs.readFileSync("./dev/stdin").toString().trim().split("\n");
const nums = input.map(v => v.split(' ').map(x => +x));
const factor = nums[1]
if (factor.length == 1) {
console.log(factor[0] * factor[0])
} else {
factor.sort((a,b)=>a-b)
console.log(factor[0] * factor[factor.length - 1])
}
728x90
'자료구조 알고리즘 > 백준' 카테고리의 다른 글
Node.js) 백준 2609번 : 최대공약수와 최소공배수 (0) | 2021.09.12 |
---|---|
Node.js) 백준 2447번 : 별 찍기 - 10 (0) | 2021.09.12 |
Node.js) 백준 5086번 : 배수와 약수 (0) | 2021.09.12 |
Node.js) 백준 10757번 : 큰 수 A+B (0) | 2021.09.12 |
Node.js) 백준 13305번 : 주유소 (0) | 2021.09.12 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- create databases;
- 은둔청년체험
- 롱베케이션
- create db
- BFS
- 투포인터
- 동적프로그래밍
- 서버점검
- 투포인터 연습
- 면접질문
- 로드나인
- DB 생성
- 다이나믹프로그래밍
- 최소공통조상
- 그래프
- 면접비
- MySQL
- 개발자면접
- node.js
- MOD
- 서버개발
- 다이나밍프로그래밍
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함