[백준] 2884번 : 알람 시계 - Dart(다트)

강재원·2022년 10월 4일
0

[코딩테스트] Dart

목록 보기
91/100



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

import 'dart:io';
void main(){
    String? s=stdin.readLineSync();
    var v=s!.split(' ').map<int>((o)=>int.parse(o));
    int h=v.elementAt(0);
    int m=v.elementAt(1);
    m-=45;
    if(m<0){
        h--;
        m+=60;
    }
    if(h<0) h=23;
    print("$h $m");
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글