본문 바로가기

+ α5

유클리드 호제법: 최대공약수 알고리즘(Java, Python) 두 자연수의 최대공약수를 구하는 알고리즘이다. 재귀함수를 사용한다. # 유클리드 호제법 A, B(자연수, A>B) 이고 A%B=R 일 때, gcd(A,B) = gcd(B,R) #Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 public class gcd { public static int gcd(int a, int b) { if(a % b == 0) return b; else return gcd(b, a % b); } public static void main(String[] args) { int result = 0; result = gcd(192,162); System.out.println(result); } } Colored by Color Scripter cs .. 2021. 5. 14.
[다운로드] Nodejs, WebStorm, MongoDB, RoboMongo 1. Nodejs Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 2. WebStorm(1달 무료 체험판): JavaScript(내가 주로 사용할 것은 React) 편집기. *React: 사용자 인터페이스(화면 UI)를 위한 자바스크립트 라이브러리 3. MongoDB: (트위터같은 곳에서) 비정형데이터를 저장할 수 있다. MongoDB Community Download Download the Community version of MongoDB's non-relational database server from MongoDB's download center. www.mongodb.com 4... 2020. 11. 16.
[다운로드] 오라클 설치 및 자바 연동 1. Oracle 다운로드 >> Windows x64 www.oracle.com/database/technologies/xe-prior-releases.html ※오라클 설치 중 비밀번호는 happy로 설정함(저장한 비밀번호 기억해둘 것) SQL Developer 다운로드(편집기) >> Windows 32-bit/64-bit www.oracle.com/tools/downloads/sqldev-downloads.html 다운로드 후 zip파일 압축풀기 >> exe파일 실행시켜서 설치 >> 경로설정: Java\jdk1.8.0_251 2. sqlplus 실행 윈도우 검색창에 sqlplus 입력 후 관리자 권한으로 실행 SQL> conn sys/happy(비밀번호) as sysdba SQL> alter user.. 2020. 8. 3.
[Java] 백준 2439_별찍기2 1234567891011121314151617181920import java.util.*;public class Main{ public static void main(String[] args){ int N=0; Scanner scan=new Scanner(System.in); N=scan.nextInt(); if(N=1) { for(int i=1;i 2020. 7. 1.
[Java] 백준 2438번_별찍기1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import java.util.*; public class { public static void main(String[] args){ int N=0; Scanner scan=new Scanner(System.in); N=scan.nextInt(); if(N1) { for(int i=1;i 2020. 7. 1.