hanker

백준(10250) JAVA - ACM 호텔 본문

Study/ALGORITHM

백준(10250) JAVA - ACM 호텔

hanker 2021. 4. 23. 16:32
반응형
import java.util.Scanner;

public class Main {

    public static void main(String ar[]) throws Exception{
        Scanner sc = new Scanner(System.in);
        int cnt = sc.nextInt();

        for(int i = 0 ; i < cnt ; i++){
            int hotelFloor = sc.nextInt();
            int roomCnt = sc.nextInt();
            int customer = sc.nextInt();

            if(N % H == 0){
                System.out.println((hotelFloor * 100) + (customer / hotelFloor));
            } else{
                System.out.println((customer % hotelFloor) * 100 + ((customer / hotelFloor) + 1));
            }
        }
    }
}
반응형