[백준] 2530번 : 인공지능 시계 - Javascript(자바스크립트)

강재원·2022년 9월 14일
0



https://www.acmicpc.net/problem/2530

const fs=require('fs')
let input=fs.readFileSync('/dev/stdin').toString().split('\n')
v=input[0].split(' ').map(x=>+x)
h=parseInt(v[0])
m=parseInt(v[1])
s=parseInt(v[2])
n=parseInt(input[1])
sum=s+n
m=m+parseInt(sum/60)
sum%=60
h=h+parseInt(m/60)
m%=60
h%=24
console.log("%d %d %d",h,m,sum)
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글