File => New => Project에서 C/C++ => C Project 선택 적당(?)하게 Project name을 적어주고, 아래 처럼 선택하고 Finish한다. (그냥 간단히 테스트만 한것이니깐...) 간단히 테스트할 수 있는 소스가 만들어 졌다. - Build => Build Project 선택해서 프로젝트를 빌드해 놓는다. - Run (ctrl+F11)으로 실행하면 console화면에 결과를 볼 수 있다. 물론, Debug(F11)로 디버깅도 가능하다.
어찌어찌 뭘 하다가 나님이 갖고 있는 android phone과 adb로 연결해볼려고 했더니, 아래 메시지처럼 나오면서 연결이 되지 않았다. List of devices attached ???????????? no permissions 그래서, 구글링을 해보니 아래 출처에서 방법이 있었다. 출처 : http://stackoverflow.com/questions/9210152/set-up-device-for-development-no-permissions Type "su" to switch to super user. your-path/adb kill-server. your-path/adb start-server. If no error occurs, you can see the device list with "your-path/adb devices" in root account. Quit super user. Now you can perform "adb devices" in your account.
문제 출처 : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=36 * http://ko.wikipedia.org/wiki/%EC%BD%9C%EB%9D%BC%EC%B8%A0_%EC%B6%94%EC%B8%A1 #include <stdio.h> long getMaxCycleLength( long i, long j) { long n, temp; long maxCycleLength = 0 ; if (j < i) { temp = i; i = j; j = temp; } for (n = i; i <= j; i++) { long cycleLengh = 1 ; n = i; while (n != 1 ) { if (n% 2 == 0 ) n >>= 1 ; else n = n* 3 + 1 ; cycleLengh++; } ...
댓글
댓글 쓰기