언젠가는 펼쳐 볼 아카이브
[BOJ] 25314번 - 코딩은 체육과목 입니다 본문
사용언어 : javascript - node.js
# 제출 코드
const fs = require('fs');
const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt';
let input = fs.readFileSync(filePath).toString().trim();
solution(input);
function solution(input) {
const inputByte = Math.floor(+input / 4);
const typeString = 'long ';
let resultString = '';
for (let i = 0; i < inputByte; ++i) {
resultString += typeString;
}
console.log(`${resultString}int`);
}
'IT > Baekjoon Oline Judge' 카테고리의 다른 글
[BOJ] 11201번 - A+B - 7 (0) | 2023.08.16 |
---|---|
15552번 - 빠른 A+B (0) | 2023.08.16 |
[BOJ] 25304번 - 영수증 (0) | 2023.08.16 |
[BOJ] 10950번 - A+B - 3 (0) | 2023.08.16 |
[BOJ] 2480번 - 주사위 세개 (0) | 2023.08.15 |