2023. 9. 14. 03:00, 알고리즘/프로그래머스
https://school.programmers.co.kr/learn/courses/30/lessons/120816
#include <string>
#include <vector>
using namespace std;
int solution(int slice, int n) {
return n%slice==0? n/slice : n/slice+1;
}
'알고리즘 > 프로그래머스' 카테고리의 다른 글
Lv 0. 옷가게 할인 받기 (0) | 2023.09.14 |
---|---|
Lv 0. 배열의 평균값 (0) | 2023.09.14 |
Lv 0. 피자 나눠 먹기(2) - gcd(), lcm()은 <numeric> 헤더에 있다. (0) | 2023.09.14 |
Lv 0. 피자 나눠 먹기(1) - 나머지 연산자는 %다. &로 착각하지 말자. (0) | 2023.09.14 |
Lv 0. 최빈값 구하기 || 전역변수로 선언한 변수나 자료구조도 사용할 수 있다는걸 배움. (0) | 2023.09.14 |
Comments, Trackbacks