๋ฐ์ํ
1061๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a | b);
pw.flush();
pw.close();
}
}
1062๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a ^ b);
pw.flush();
pw.close();
}
}
1063๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a > b ? a : b);
pw.flush();
pw.close();
}
}
1064๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int c = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println((a>b ? b:a) > c ? c : (a>b ? b:a));
pw.flush();
pw.close();
}
}
1065๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int c = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
if (a%2 == 0) pw.println(a);
if (b%2 == 0) pw.println(b);
if (c%2 == 0) pw.println(c);
pw.flush();
pw.close();
}
}
1066๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int c = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
if (a%2 == 0) {
pw.println("even");
} else {
pw.println("odd");
}
if (b%2 == 0) {
pw.println("even");
} else {
pw.println("odd");
}
if (c%2 == 0) {
pw.println("even");
} else {
pw.println("odd");
}
pw.flush();
pw.close();
}
}
1067๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
long a = Long.parseLong(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
if (a >= 0) {
System.out.println("plus");
} else {
System.out.println("minus");
}
if (a % 2 == 0) {
System.out.println("even");
} else {
System.out.println("odd");
}
pw.flush();
pw.close();
}
}
1068๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
if (a >= 90) {
System.out.println("A");
}
else if (a >= 70) {
System.out.println("B");
}
else if (a >= 40) {
System.out.println("C");
}
else if (a >= 0) {
System.out.println("D");
}
pw.flush();
pw.close();
}
}
1069๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
String a = st.nextToken();
br.close();
PrintWriter pw = new PrintWriter(System.out);
switch (a) {
case "A":
System.out.println("best!!!");
break;
case "B":
System.out.println("good!!");
break;
case "C":
System.out.println("run!");
break;
case "D":
System.out.println("slowly~");
break;
default:
System.out.println("what?");
break;
}
pw.flush();
pw.close();
}
}
1070๋ฒ
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
String a = st.nextToken();
br.close();
PrintWriter pw = new PrintWriter(System.out);
switch (a) {
case "12":
case "1":
case "2":
System.out.println("winter");
break;
case "3":
case "4":
case "5":
System.out.println("spring");
break;
case "6":
case "7":
case "8":
System.out.println("summer");
break;
case "9":
case "10":
case "11":
System.out.println("fall");
break;
}
pw.flush();
pw.close();
}
}
๋ฐ์ํ
'Algorithm > CodeUp ๊ธฐ์ด 100์ ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1071~1080๋ฒ (0) | 2023.03.04 |
---|---|
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1051~1060๋ฒ (0) | 2023.03.04 |
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1041~1050๋ฒ (0) | 2023.03.04 |
[์ฝ๋์ ๊ธฐ์ด 100์ -C์ธ์ด] 1031~1040๋ฒ (0) | 2023.02.27 |
[์ฝ๋์ ๊ธฐ์ด 100์ -C์ธ์ด] 1021~1030๋ฒ (0) | 2023.02.27 |
๋๊ธ