class Solution {
public int solution(int n) {
double tmp =(double)n/7;
// System.out.println("tmp = " + tmp);
double result=Math.ceil(tmp);
// System.out.println("result = " + result);
return (int)result;
}
public static void main(String[] args) {
Solution s = new Solution();
int n = 1;
System.out.println(s.solution(n));
}
}
'임시저장소' 카테고리의 다른 글
반대로 슬라이싱 개념정리★ + [ : -1] + [ : :-1] (0) | 2022.12.16 |
---|---|
파이썬 n/10 vs n//10 (0) | 2022.12.12 |
오늘의 교훈 (0) | 2022.12.08 |
위 아래 정렬★★ (0) | 2022.12.04 |
재귀함수는 루트 노드가 된다. (0) | 2022.11.10 |