
[바미] 알고리즘 수업 - 알고리즘의 수행 시간 6
·
하루 알고리즘(JS)
https://www.acmicpc.net/problem/24267 코드 const input = require('fs').readFileSync(process.platform === "linux" ? "/dev/stdin" : "./input.txt").toString().trim(); const result = ( BigInt(input) * BigInt(input - 1) * BigInt(input - 2) ) / BigInt(6); console.log(`${result}\n${3}`); 문제 설명 문제는 주어진 MenOfPassion 알고리즘에 대한 수행 시간을 분석하고, 그 결과를 특정 형식으로 출력하는 문제인데요. MenOfPassion 알고리즘은 세 개의 중첩된 for 반복문을 사용하여 특..