Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 인터페이스
- docker
- IntelliJ
- 오블완
- top
- analytics4
- spring
- DBMS
- MongoDB
- 자바
- MariaDB
- JPA
- 추상클래스
- group by
- Linux
- PostgreSQL
- java
- 차이점
- 티스토리챌린지
- oracle
- Javascript
- 호이스팅
- git
- mysql
- 트랜잭션
- mssql
- 명령어
- rsync
- 리눅스
- SQL
Archives
- Today
- Total
hanker
백준(10250) JAVA - ACM 호텔 본문
반응형
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));
}
}
}
}
반응형
'Study > ALGORITHM' 카테고리의 다른 글
백준(10757) JAVA - 큰 수 A + B (0) | 2021.04.30 |
---|---|
백준(2775) JAVA - 부녀회장이 될테야 (0) | 2021.04.29 |
백준(2869) JAVA - 달팽이는 올라가고 싶다. (0) | 2021.03.02 |
백준(1193) JAVA - 분수찾기 (0) | 2021.01.21 |
백준(2292) JAVA - 벌집 (0) | 2021.01.15 |