Skip to content

Commit

Permalink
Weekly Pull Request - 최연지 (#374)
Browse files Browse the repository at this point in the history
* feat(YeonJi-Choi): [BOJ, 2562] 최댓값
https://www.acmicpc.net/problem/2562

* feat(YeonJi-Choi): [BOJ, 2588] 곱셈
https://www.acmicpc.net/problem/2588

* feat(YeonJi-Choi): [BOJ, 2742] 곱셈
https://www.acmicpc.net/problem/2742

* feat(YeonJi-Choi): [BOJ, 2742] 윤년
https://www.acmicpc.net/problem/2753

* feat(YeonJi-Choi): [BOJ, 5543] 상근날드
https://www.acmicpc.net/problem/5543

* feat(YeonJi-Choi): [BOJ, 10172] 개
https://www.acmicpc.net/problem/10172

* feat(YeonJi-Choi): [BOJ, 10797] 10부제
https://www.acmicpc.net/problem/10797

* feat(YeonJi-Choi): [BOJ, 10817] 세 수
https://www.acmicpc.net/problem/10817

* feat(YeonJi-Choi): [BOJ, 11022] A+B - 8
https://www.acmicpc.net/problem/11022

* feat(YeonJi-Choi): [BOJ, 11654] 아스키 코드
https://www.acmicpc.net/problem/11654

* feat(YeonJi-Choi): [BOJ, 14681] 사분면 고르기
https://www.acmicpc.net/problem/14681
  • Loading branch information
yungc97 committed Jul 31, 2021
1 parent 1f0d054 commit 4f904b1
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 0 deletions.
12 changes: 12 additions & 0 deletions baekjoon/BOJ_10172.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package baekjoon;

public class BOJ_10172 {

public static void main(String[] args) {
System.out.println("|\\_/|\n"
+ "|q p| /}\n"
+ "( 0 )\"\"\"\\\n"
+ "|\"^\"` |\n"
+ "||_/=\\\\__|");
}
}
22 changes: 22 additions & 0 deletions baekjoon/BOJ_10797.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_10797 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();
int b = 0;

for(int i=0; i<5; i++) {
if(sc.nextInt() % 10 == a) {
b += 1;
}
}

System.out.println(b);
}
}
28 changes: 28 additions & 0 deletions baekjoon/BOJ_10817.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_10817 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int num[] = {sc.nextInt(), sc.nextInt(), sc.nextInt()};
int tmp = 0;

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

for(int j = i+1; j < 3; j++) {

if(num[i] > num[j]) {
tmp = num[i];
num[i] = num[j];
num[j] = tmp;
}
}
}

System.out.println(num[2]);
}
}
21 changes: 21 additions & 0 deletions baekjoon/BOJ_11022.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_11022 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int t = sc.nextInt();

for (int i=1; i<=t; i++) {

int a = sc.nextInt();
int b = sc.nextInt();

System.out.println("Case #" + i + ": " + a + " + " + b + " = " + (a+b));
}
}
}
13 changes: 13 additions & 0 deletions baekjoon/BOJ_11654.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_11654 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.println((int)sc.next().charAt(0));
}
}
18 changes: 18 additions & 0 deletions baekjoon/BOJ_14681.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_14681 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int x = sc.nextInt();
int y = sc.nextInt();

int n = (x>0) ? (y>0)?1:4 : (y>0)?2:3;

System.out.println(n);
}
}
26 changes: 26 additions & 0 deletions baekjoon/BOJ_2562.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_2562 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int max = 0;
int index = 0;

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

int a = sc.nextInt();

if(a > max) {
max = a;
index = i;
}
}

System.out.println(max + "\n" + index);
}
}
16 changes: 16 additions & 0 deletions baekjoon/BOJ_2588.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_2588 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();
int b = sc.nextInt();

System.out.printf("%d\n%d\n%d\n%d", a*(b%10), a*(b%100/10), a*(b/100), a*b);
}
}
16 changes: 16 additions & 0 deletions baekjoon/BOJ_2742.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_2742 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

for(int i = sc.nextInt(); i>0; i--) {
System.out.println(i);
}
}

}
16 changes: 16 additions & 0 deletions baekjoon/BOJ_2753.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_2753 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();

System.out.println((a%4==0 && a%100!=0 || a%400==0) ? 1 : 0);
}

}
23 changes: 23 additions & 0 deletions baekjoon/BOJ_5543.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package baekjoon;

import java.util.Scanner;

public class BOJ_5543 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int[] bg = {sc.nextInt(), sc.nextInt(), sc.nextInt()};

int d1 = sc.nextInt();
int d2 = sc.nextInt();

int b = bg[0] < bg[1] ? bg[0] < bg[2] ? bg[0] : bg[2] : bg[1] < bg[2] ? bg[1] : bg[2];

int result = d1 < d2 ? b+d1-50 : b+d2-50;

System.out.println(result);
}

}

0 comments on commit 4f904b1

Please sign in to comment.