[백준] 10250번 : ACM 호텔 - Dart(다트)

강재원·2022년 10월 2일
0

[코딩테스트] Dart

목록 보기
88/100



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

import 'dart:io';
void main(){
    int t=int.parse(stdin.readLineSync()!);
    for(int i=0;i<t;i++){
        String? s=stdin.readLineSync();
        var v=s!.split(' ').map<int>((o)=>int.parse(o));
        int h=v.elementAt(0);
        int w=v.elementAt(1);
        int n=v.elementAt(2);
        if(n%h==0){
            if(n~/h<10) print('${h}0${n~/h}');
            else print('${h}${n~/h}');
        }
        else{
            if((n~/h)+1<10) print('${n%h}0${(n~/h)+1}');
            else print('${n%h}${(n~/h)+1}');
        } 
    }
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글