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 - 최연지 #374

Merged
merged 11 commits into from
Jul 31, 2021
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);
}

}