๋ฐ์ํ
1051๋ฒ
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);
if (a <= b) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1052๋ฒ
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);
if (a != b) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1053๋ฒ
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 == 0) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1054๋ฒ
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.printf("%d", a & b);
pw.flush();
pw.close();
}
}
1055๋ฒ
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.printf("%d", a | b);
pw.flush();
pw.close();
}
}
1056๋ฒ
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);
if (a != b) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1057๋ฒ
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);
if (a == b) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1058๋ฒ
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);
if (a == 0 && b == 0) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1059๋ฒ
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);
pw.printf("%d", ~a);
pw.flush();
pw.close();
}
}
1060๋ฒ
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();
}
}
๋ฐ์ํ
'Algorithm > CodeUp ๊ธฐ์ด 100์ ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1071~1080๋ฒ (0) | 2023.03.04 |
---|---|
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1061~1070๋ฒ (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 |
๋๊ธ