일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- dbms
- Entity
- X윈도우
- Class
- Entity Set
- 리눅스 기초
- systemd
- 셀레니움
- zsh
- preprocessing
- X.org
- Inheritance
- 백준
- 리눅스 마스터 1급
- 자바
- BFS
- Polymolphism
- Operator
- Mac
- Java
- literal
- Reference Type
- Physical Scheme
- Unity
- External Scheme
- python
- OOP
- selenium
- 리눅스
- Binary Search
- Today
- Total
목록Algorithm/Math (4)
Byeol Lo
import java.io.*;import java.util.*;public class Main { final static BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); final static BufferedWriter BW = new BufferedWriter(new OutputStreamWriter(System.out)); public static void main(String[] args) throws IOException { int to = Integer.parseInt(BR.readLine()); int tmp = to, divisor = 2; while (..
import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int level = (int) Math.ceil((-1 + Math.sqrt(1 + 8 * n)) / 2); int a = n - (level - 1) * level / 2; int b = level + 1 - a; if (level % 2 == 0) { System.out.println(a + "/" + b); } else { ..
import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); solution(sc.nextInt()); } public static void solution(int n) { System.out.println((long) (Math.pow(4, n) + Math.pow(2, n+1) + 1)); }}
import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); solution(sc.nextLong(), sc.nextLong()); } public static void solution(long a, long b) { long lcm = lcm (a, b); System.out.println(a * b / lcm); } public static long lcm (long a, long b) { while (b != 0) { long temp..