Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly Pull Request - 김수정 #350

Merged
merged 25 commits into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e145591
feat(Soojung-Kim) : [BOJ, 2577] 숫자의 개수
hailey21 May 6, 2021
bc01490
feat(Soojung-Kim) : [BOJ, 15552] 빠른 A+B
hailey21 May 6, 2021
91aab9d
feat(Soojung-Kim) : [BOJ, 2741] N 찍기
hailey21 May 6, 2021
ae7fb67
feat(Soojung-Kim) : [BOJ, 10039] 평균점수
hailey21 May 6, 2021
f07e512
feat(Soojung-Kim) : [BOJ, 10430] 나머지
hailey21 May 6, 2021
bbd558b
feat(Soojung-Kim) : [BOJ, 13277] 큰 수 곱셈
hailey21 May 6, 2021
99476db
feat(Soojung-Kim) : 계정 변경 커밋 테스트
hailey21 May 6, 2021
6745ff7
feat(Soojung-Kim) : 계정 변경 푸시 테스트
hailey21 May 6, 2021
533a759
feat(Soojung-Kim) : 인증 커밋 테스트
hailey21 May 7, 2021
f4715ed
feat(Soojung-Kim) : [BOJ, 2953] 요리사
hailey21 May 14, 2021
5bdb231
feat(Soojung-Kim) : [BOJ, 10951] A+B - 4
hailey21 May 17, 2021
e2a7f12
feat(Soojung-Kim) : [BOJ, 2440] 별 찍기 - 3
hailey21 May 20, 2021
746974e
feat(Soojung-Kim) : [BOJ, 4344] 평균은 넘겠지
hailey21 May 25, 2021
70db281
feat(Soojung-Kim) : [BOJ, 11720] 숫자의 합
hailey21 May 25, 2021
aaea02e
feat(Soojung-Kim) : [BOJ, 1152] 단어의 개수
hailey21 Jun 3, 2021
64f14e3
feat(Soojung-Kim) : [BOJ, 2445] 별 찍기 - 8
hailey21 Jun 7, 2021
b8bcba0
feat(Soojung-Kim) : [BOJ, 9610] 사분면
hailey21 Jun 14, 2021
a75b130
feat(Soojung-Kim) : [BOJ, 1076] 저항
hailey21 Jun 14, 2021
90e6039
feat(Soojung-Kim) : [BOJ, 18883] N M 찍기
hailey21 Jun 14, 2021
741f517
feat(Soojung-Kim) : [BOJ, 1009] 분산처리
hailey21 Jun 14, 2021
4369c92
feat(Soojung-Kim) : [BOJ, 15596] 정수 N개의 합
hailey21 Jun 14, 2021
4165a5d
feat(Soojung-Kim) : [BOJ, 10996] 별 찍기 - 21
hailey21 Jun 14, 2021
97f4209
feat(Soojung-Kim) : [BOJ, 6996] 애너그램
hailey21 Jun 21, 2021
1a25fd5
feat(Soojung-Kim) : [BOJ, 2525] 오븐 시계
hailey21 Jun 30, 2021
635a4cf
feat(Soojung-Kim) : [BOJ, 10871] X보다 작은 수
hailey21 Jul 5, 2021
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
19 changes: 19 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_10039.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BOJ_10039 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

int sum = 0;
for (int i = 0; i < 5; i++) {
int score = Integer.parseInt(br.readLine());
sum += score < 40 ? 40 : score;
}
System.out.println(sum / 5);
br.close();
}
}
36 changes: 36 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_1009.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class BOJ_1009 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

int N = Integer.parseInt(br.readLine());

for (int i = 0; i < N; i++) {

String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");

int N1 = Integer.parseInt(st.nextToken());
int N2 = Integer.parseInt(st.nextToken());

int tmp = 1;
for (int j = 0; j < N2; j++) {
tmp = tmp * N1 % 10;
}

if (tmp == 0) {
System.out.println(10);
} else {
System.out.println(tmp);
}
}

br.close();
}
}
26 changes: 26 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_10430.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class BOJ_10430 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");

int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
int C = Integer.parseInt(st.nextToken());

System.out.println( (A+B)%C );
System.out.println( (A%C + B%C)%C );
System.out.println( (A*B)%C );
System.out.println( (A%C * B%C)%C );

br.close();
}
}
88 changes: 88 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_1076.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BOJ_1076 {
public static void main(String[] args) throws IOException {

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String ans = "";
for (int i = 0; i < 3; i++) {
if (i == 2) {
ans = String.valueOf(Long.parseLong(ans) * Long.parseLong(calc(br.readLine(), i)));
} else {
ans += calc(br.readLine(), i);
}
}

System.out.println(ans);
br.close();
}

static String calc(String s, int state) {
if (s.equals("black")) {
if (state == 2) {
return "1";
} else {
return "0";
}
} else if (s.equals("brown")) {
if (state == 2) {
return "10";
} else {
return "1";
}
} else if (s.equals("red")) {
if (state == 2) {
return "100";
} else {
return "2";
}
} else if (s.equals("orange")) {
if (state == 2) {
return "1000";
} else {
return "3";
}
} else if (s.equals("yellow")) {
if (state == 2) {
return "10000";
} else {
return "4";
}
} else if (s.equals("green")) {
if (state == 2) {
return "100000";
} else {
return "5";
}
} else if (s.equals("blue")) {
if (state == 2) {
return "1000000";
} else {
return "6";
}
} else if (s.equals("violet")) {
if (state == 2) {
return "10000000";
} else {
return "7";
}
} else if (s.equals("grey")) {
if (state == 2) {
return "100000000";
} else {
return "8";
}
} else {
if (state == 2) {
return "1000000000";
} else {
return "9";
}
}
}
}
31 changes: 31 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_10871.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package baekjoon;

import java.util.Scanner;
import java.util.StringTokenizer;

public class BOJ_10871 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

String str = scanner.nextLine();

StringTokenizer st = new StringTokenizer(str, " ");
int n = Integer.parseInt(st.nextToken());
int greaterThen = Integer.parseInt(st.nextToken());

String str2 = scanner.nextLine();
st = new StringTokenizer(str2, " ");

StringBuilder sb = new StringBuilder();

for (int i = 0; i < n; i++) {
int tmp = Integer.parseInt(st.nextToken());
if (greaterThen > tmp) {
sb.append(tmp);
sb.append(" ");
}
}

System.out.println(sb);
}
}
14 changes: 14 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_10951.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package baekjoon;

import java.io.IOException;
import java.util.Scanner;

public class BOJ_10951 {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);

while (scanner.hasNextInt()) {
System.out.println(scanner.nextInt() + scanner.nextInt());
}
}
}
41 changes: 41 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_10996.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BOJ_10996 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

int N = Integer.parseInt(br.readLine());

StringBuilder sb = new StringBuilder();

for (int i = 1; i <= N * 2; i++) {

for (int j = 1 ; j <= N; j++) {

if (i % 2 == 1) {
if (j % 2 == 1) {
sb.append("*");
} else {
sb.append(" ");
}
} else {
if (j % 2 == 1) {
sb.append(" ");
} else {
sb.append("*");
}
}

}

sb.append("\n");
}

System.out.println(sb);
br.close();
}
}
20 changes: 20 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_1152.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class BOJ_1152 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String str = br.readLine();

StringTokenizer st = new StringTokenizer(str, " ");


System.out.println(st.countTokens());
br.close();
}
}
21 changes: 21 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_11720.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BOJ_11720 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

int n = Integer.parseInt(br.readLine());
String str = br.readLine();
int sum = 0;
for (int i = 0; i < n; i++) {
sum += Integer.parseInt(str.substring(i, i+1));
}
System.out.println(sum);

br.close();
}
}
19 changes: 19 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_13277.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package baekjoon;

import java.io.*;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class BOJ_13277 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");

BigInteger a = new BigInteger(st.nextToken());
BigInteger b = new BigInteger(st.nextToken());
System.out.println(a.multiply(b));

br.close();
}
}
23 changes: 23 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_15552.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package baekjoon;

import java.io.*;
import java.util.StringTokenizer;

public class BOJ_15552 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

int count = Integer.parseInt(br.readLine());
StringTokenizer st;

for (int i = 0; i < count; i++) {
st = new StringTokenizer(br.readLine(), " ");
bw.write(Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()) + "\n");
}
br.close();

bw.flush();
bw.close();
}
}
15 changes: 15 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_15596.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package baekjoon;

public class BOJ_15596 {
}

class Test {
public static long sum(int[] a) {
long sum = 0;

for (int i = 0; i < a.length; i++) {
sum += a[i];
}
return sum;
}
}
33 changes: 33 additions & 0 deletions Soojung-Kim/baekjoon/BOJ_18883.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package baekjoon;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class BOJ_18883 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");

int N1 = Integer.parseInt(st.nextToken());
int N2 = Integer.parseInt(st.nextToken());

StringBuilder sb = new StringBuilder();
for (int i = 1; i <= N1 * N2; i++) {

sb.append(i);
if (i % N2 == 0) {
sb.append("\n");
} else {
sb.append(" ");
}
}

System.out.println(sb);

br.close();
}
}
Loading