일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- #JAVASCRIPT
- #다차원포인터
- html multimedia
- #성적관리프로그램
- border-box
- #1차원배열
- html5 new tag
- html charset
- #3차원배열
- html video
- 토큰경제
- html plug-in
- #CallByAddress
- html object
- html id
- git flow
- #자바상속#자바이즈어#is~a
- 하이퍼레저패브릭
- relative path
- #android activity
- #2차원배열
- mac terminal command
- #C++ 연산자함수오버로딩
- hyperledger transaction
- html code
- docker example
- #binary
- #bubbleSort
- html youtube
- #C++ has~a
Archives
- Today
- Total
목록#우박수 (1)
A sentimental robot
콜라체의 수 / 우박수
// 어떤 수든 1로 수렴 int n = 2018; while (true) { System.out.println(n); if (n % 2 == 0) n = n / 2; else n = n * 3 + 1; if (n == 1) break; } System.out.println(n); // 삼항 연산자 사용 int n = 2018; while (true) { System.out.println(n); n = (n % 2 == 0) ? n / 2 : n * 3 + 1; if (n == 1) break; } System.out.println(n);
Data Structure
2018. 2. 13. 11:31