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 | 29 | 30 |
Tags
- Stack
- 문제풀이
- OS
- 개발
- 코테
- 컴공
- 정석
- bfs
- coding
- 오에스
- 알고리즘
- cs
- 자료구조
- Operating System
- 구현
- 그래프
- 코딩
- 오퍼레이팅시스템
- 너비우선탐색
- vector
- 스택
- Computer science
- 북리뷰
- 브루트포스
- DP
- 컴공과
- c++
- 정석학술정보관
- 컴퓨터공학과
- 백준
Archives
- Today
- Total
Little Jay
[C++] 백준 10250번 ACM호텔 본문
#include <iostream>
using namespace std;
int main() {
int testCase, height, width, number;
cin >> testCase;
for (int i = 0; i < testCase; i++) {
cin >> height >> width >> number;
int y, x;
y = number % height;
x = number / height;
if (y > 0) {
x++;
}
else {
y = height;
}
cout << y * 100 + x << "\n";
}
return 0;
}'알고리즘 > BOJ' 카테고리의 다른 글
| [C++] 백준 2577번 숫자의 개수 (0) | 2021.03.14 |
|---|---|
| [C++] 백준 10814번 나이순 정렬 (0) | 2021.03.11 |
| [C++] 백준 1085번 직사각형에서 탈출 (0) | 2021.03.11 |
| [C++] 백준 2751번 수 정렬하기 2 (0) | 2021.03.11 |
| [C++] 백준 1259번 팰린드롬수 (0) | 2021.03.08 |
Comments