20250511 baekjoon

This commit is contained in:
songyc macbook 2025-05-13 20:49:38 +09:00
parent 097bae995e
commit fd296537b8
7 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,2 @@
const n = require("fs").readFileSync("/dev/stdin").toString().split(" ").map(Number);
console.log(n[0]>n[1]?">":n[0]<n[1]?"<":"==");

View File

@ -0,0 +1,2 @@
const n = require("fs").readFileSync(0, 'utf-8').toString().split("\n");
console.log([[3,2],[4,1]][+(n[0]>0)][+(n[1]>0)]);

View File

@ -0,0 +1,2 @@
const [a,b,c] = require("fs").readFileSync(0,"utf-8").toString().split(" ").map(Number);
console.log(a==b && b==c ? a*1000+10000 : a==b || a==c ? a*100+1000 : b==c ? b*100+1000 : Math.max(a,b,c)*100);

View File

@ -0,0 +1,5 @@
const n = require("fs").readFileSync(0, "utf-8").toString().split("\n");
const [h, m] = n[0].split(" ").map(Number);
const d = parseInt(n[1]);
const t = h*60 + m + d + 1440;
console.log("%d %d",Math.floor(t/60)%24, t%60);

View File

@ -0,0 +1,2 @@
const n = require("fs").readFileSync("/dev/stdin").toString();
console.log(n%400==0||((n%4==0 && n%100!=0))?1:0);

View File

@ -0,0 +1,3 @@
const n = require("fs").readFileSync(0, "utf-8").toString().split(" ").map(Number);
const t = 60*n[0] + n[1] +1395;
console.log("%d %d",Math.floor(t/60)%24,t%60);

View File

@ -0,0 +1,2 @@
const n = require("fs").readFileSync("/dev/stdin").toString();
console.log("FFFFFFDCBAA"[Math.floor(n/10)]);