일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- oracle
- Javascript
- DBMS
- 오블완
- mssql
- 추상클래스
- 호이스팅
- 자바
- 인터페이스
- analytics4
- 티스토리챌린지
- PostgreSQL
- 트랜잭션
- 리눅스
- top
- mysql
- 차이점
- group by
- java
- 명령어
- spring
- docker
- git
- Linux
- MariaDB
- rsync
- IntelliJ
- MongoDB
- JPA
- SQL
- Today
- Total
목록Study/ALGORITHM (42)
hanker
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int a = 1; int b = 1; int tmp = 1; for(int i = 1 ; i
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int tmp = 0; int cnt = 1; for(int i = 0 ; i < N ; i++) { tmp += i; if(N = (6 * (tmp - i)) + 2) { cnt = i + 1; break; } } System.out.println(cnt); } }
import java.util.Scanner; public class Main { public static void main(String ar[]) throws Exception{ Scanner sc = new Scanner(System.in); // 고정비용 int A = sc.nextInt(); // 가변비용 (한 개당 비용) int B = sc.nextInt(); // 판매 가 int C = sc.nextInt(); int cnt = 1; // A + (B * ?) = C) { cnt = -1; } else { while(true) { if(A < (C - B) * cnt) { break; } else { cnt++; } } } System...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int count = 0; char[] chr = new char[(int)'z' + 1]; for(int i = 0 ; i < N ; i++) { for(int j = 0 ; j < chr.length ; j++) { //초기화 chr[j] = 'o'; } boolean flag = true; String str = sc.next(); for(int j = 0 ; j < str.length() ; j++) { if(chr[(int)str.char..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); int sum = 0; for(int i = 0 ; i < str.length(); i++) { char chr = str.charAt(i); if(chr == 'c') { if(i+1 < str.length()) { if(str.charAt(i+1) == '=' || str.charAt(i+1) == '-') { sum++; i++; }else { sum++; } } else { sum++; } } else if(chr == 'd') ..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); int sum = 0; for(int i = 0 ; i < str.length(); i++) { char chr = str.charAt(i); if((int)chr
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); String strA = String.valueOf(a); String strB = String.valueOf(b); String tmpA = new StringBuffer(strA).reverse().toString(); String tmpB = new StringBuffer(strB).reverse().toString(); a = Integer.parseInt(tmpA); b = Integer.parseI..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String ar[] = str.split(" "); int cnt = 0; for(int i = 0 ; i < ar.length; i++) { if(ar[i].equals("") || ar[i] == null) { cnt++; } } System.out.println(ar.length - cnt); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); char[] ar = str.toUpperCase().toCharArray(); int[] num = new int[(int)'Z' + 1]; for(int i = 0 ; i < str.length(); i++) { num[(int)ar[i]]++; } int tmp = 0; int alpha = 0; int cnt = 0; for(int i = 0 ; i < (int)'Z'+1 ; i++) { if(num[i] != 0) { if(tm..
import java.util.Scanner; public class Main { /** * (2675) - 문자열 반복 */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for(int i = 0 ; i < N ; i++) { String P = ""; int R = sc.nextInt(); String S = sc.next(); char[] ar = S.toCharArray(); for(int j = 0 ; j < ar.length ; j++) { for(int k = 0 ; k < R ; k++) { P = P.concat(Character.toString(ar[j])..