IT/Baekjoon Oline Judge

[BOJ] 25314번 - 코딩은 체육과목 입니다

개발자희망생고롸파덕 2023. 8. 16. 17:28

사용언어 : 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`);
}