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
- 프로그래머스
- 기초100제
- 정렬
- 공부
- Java
- 스프링
- react-redux
- 분할메모리할당
- 파이썬
- codeup
- CPU 스케줄링
- memory
- js to ts
- 자료구조
- Redux
- react
- error
- 코드업
- Spring
- 알고리즘
- 백준
- C++
- OS
- 일상
- 협업
- Operating System
- 타입스크립트
- 토이프로젝트
- 리덕스장바구니
- web
Archives
- Today
- Total
감자튀김 공장🍟
[Codeup]JAVA 1052~1061 본문
반응형
[1052]
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();
if(a != b) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
[1053]
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 == 1) {
if(a == 0) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
}
[1054]
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();
if((a == 0 || a == 1) && (b == 0 || b == 1)) {
if(a == 1 && b == 1) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
}
[1055]
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();
if((a == 1 || a == 0) && (b == 1 || b == 0)) {
if(a == 1 || b == 1) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
}
[1056]
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();
if((a == 1 || a == 0) && (b == 1 || b == 0)) {
if(a != 1 && b == 1 || a == 1 && b != 1){
System.out.println(1);
}
else
System.out.println(0);
}
}
}
[1057]
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();
if((a == 1 || a == 0) && (b == 1 || b == 0)) {
if(a == 1 && b == 1 || a == 0 && b == 0){
System.out.println(1);
}
else
System.out.println(0);
}
}
}
[1058]
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();
if((a == 1 || a == 0) && (b == 1 || b == 0)) {
if(a != 1 && b != 1){
System.out.println(1);
}
else
System.out.println(0);
}
}
}
[1059]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
System.out.println(~a);
}
}
[1060]
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);
}
}
[1061]
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);
}
}
반응형
'Algorithm > CodeUp' 카테고리의 다른 글
[CodeUp]JAVA 1072~1081 (0) | 2021.03.17 |
---|---|
[CodeUp]JAVA 1062~1071 (0) | 2021.03.16 |
[CodeUp]JAVA 1042~1051 (0) | 2021.03.14 |
[CodeUp]JAVA 1032~1041 (0) | 2021.03.13 |
[CodeUp]JAVA 1022~1031 (0) | 2021.03.13 |
Comments