Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 백준
- 알고리즘
- OS
- CPU 스케줄링
- Java
- react-redux
- 정렬
- codeup
- 스프링
- 기초100제
- Spring
- js to ts
- error
- 분할메모리할당
- Redux
- 리덕스장바구니
- 타입스크립트
- Operating System
- 파이썬
- 토이프로젝트
- react
- web
- 일상
- 자료구조
- C++
- memory
- 코드업
- 공부
- 협업
- 프로그래머스
Archives
- Today
- Total
감자튀김 공장🍟
[CodeUp]JAVA 1062~1071 본문
반응형
[1062]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int x = a ^ b;
System.out.println(x);
}
}
[1063]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.printf("%d", a > b ? a : b );
}
}
[1064]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
System.out.printf("%d", (a < b ? a : b) < c ? (a < b ? a : b) : c);
}
}
[1065]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
if(a % 2 == 0) {
System.out.println(a);
}
if(b % 2 == 0) {
System.out.println(b);
}
if(c % 2 == 0) {
System.out.println(c);
}
}
}
[1066]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
if(a % 2 == 0)
System.out.println("even");
else
System.out.println("odd");
if(b % 2 == 0)
System.out.println("even");
else
System.out.println("odd");
if(c % 2 == 0)
System.out.println("even");
else
System.out.println("odd");
}
}
[1067]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
if(a > 0 || a < 0) {
if (a > 0) {
System.out.println("plus");
if(a % 2 == 0)
System.out.println("even");
else
System.out.println("odd");
}
else {
System.out.println("minus");
if(a % 2 == 0)
System.out.println("even");
else
System.out.println("odd");
}
}
}
}
[1068]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
if(a >= 90 && a <= 100)
System.out.println("A");
else if(a >= 70 && a < 90)
System.out.println("B");
else if(a >= 40 && a < 70)
System.out.println("C");
else
System.out.println("D");
}
}
[1069]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
char a = scanner.next().charAt(0);
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;
}
}
}
[1070]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
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;
}
}
}
[1071]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while(true) {
int a = scanner.nextInt();
if (a == 0)
break;
System.out.println(a);
}
}
}
반응형
'Algorithm > CodeUp' 카테고리의 다른 글
[CodeUp]JAVA 1082~1091 (0) | 2021.03.18 |
---|---|
[CodeUp]JAVA 1072~1081 (0) | 2021.03.17 |
[Codeup]JAVA 1052~1061 (0) | 2021.03.15 |
[CodeUp]JAVA 1042~1051 (0) | 2021.03.14 |
[CodeUp]JAVA 1032~1041 (0) | 2021.03.13 |
Comments