Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions BAEKJOON/week07/yejin/Q1110.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import java.util.Scanner;

/**
* Q1110
*
* #### 제출
* 틀렸습니다.
*
* -> 파이썬으로 하면 성공인데 어이없음
*/

public class Q1110 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
int tmpN = n;

int cnt = 0;
while (true) {
int a = tmpN / 10;
int b = tmpN % 10;
int tmp = b * 10 + ((a+b)%10);
cnt++;
System.out.println(tmp + " " +cnt);
if (tmp == n)
break;
tmpN = tmp;
}
System.out.println(cnt);
}
}
47 changes: 47 additions & 0 deletions BAEKJOON/week07/yejin/Q1312.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
* Q1312
*
* #### 제출
* 실패
*/

public class Q1312 {
// bufferedReader 사용

// public static void main(String[] args) throws Exception {
// BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// StringTokenizer st = new StringTokenizer(br.readLine());
// br.close();

// int[] arr = new int[3];
// int i = 0;
// while(st.hasMoreTokens()){
// arr[i++] = Integer.parseInt(st.nextToken());
// }
// double result = (double) arr[0] / arr[1];
// int multi = 1;
// for (int j = 0; j < arr[2]; j++){
// multi *= 10;
// }
// System.out.println((int)(result * multi )% 10);
// }

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Double a = sc.nextDouble();
Double b = sc.nextDouble();
int n = sc.nextInt();

String result = Double.toString(a / b);
System.out.println(result);
int c = result.charAt(n + 1) - '0';
System.out.println(c);
System.out.println(result.charAt(n + 1) - '0');
}
}
32 changes: 32 additions & 0 deletions BAEKJOON/week07/yejin/Q2839.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import java.util.Scanner;

/*
* 3, 5kg 봉지를 갖고 있음
*
* #### 제출
* 성공
*/
public class Q2839 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int result = 0;
scan.close();

while (true) {
if (n % 5 == 0) {
result += n / 5;
System.out.println(result);
break;
} else {
n -= 3;
result++;
}

if(n < 0) {
System.out.println(-1);
break;
}
}
}
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
|4주차|백준] 덱(10866)<br/>백준] 모음의 수(1264)|https://www.acmicpc.net/problem/10866<br/>https://www.acmicpc.net/problem/1264|
|5주차|백준] 슈퍼마리오(2851)<br/>백준] 2루수 이름이 뭐야(17350)|https://www.acmicpc.net/problem/2851<br/>https://www.acmicpc.net/problem/17350|
|6주차|백준] 평균점수(10039)<br/>백준] 덱(10866) [re]|https://www.acmicpc.net/problem/10039<br/>https://www.acmicpc.net/problem/10866|
|7주차|백준] 소수(1312)<br/>백준] 더하기 사이클(1110) [re]|https://www.acmicpc.net/problem/1312<br/>https://www.acmicpc.net/problem/1110|

</div>
</details>
Expand All @@ -42,6 +43,10 @@
<br/>

## 알고리즘 정리
- ### 자료구조
- **자료구조**
- [Deque](https://puddle-horse-c8c.notion.site/Deque-5717b3f2251840b18a92620edadebf62) --> [관련 문제 : 백준 10866번](https://www.acmicpc.net/problem/10866)
- **수학**
- [에라토스테네스의 체](https://puddle-horse-c8c.notion.site/9e76cf12e0604350a81222705138631d) --> [관련 문제 : 백준 1929번](https://www.acmicpc.net/problem/1929)
- **그리디 알고리즘**
- [탐욕 알고리즘](https://puddle-horse-c8c.notion.site/d878145382924792a2cd6216236cf0c6) --> [관련 문제 : 백준 2839번](https://www.acmicpc.net/problem/2839)