コードベース100題(51~60)
3653 ワード
1051
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
int ret;
if(n1 <= n2){
ret = 1;
}else{
ret = 0;
}
System.out.print(ret);
}
}
1052import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
int ret;
if(n1 != n2){
ret = 1;
}else{
ret = 0;
}
System.out.print(ret);
}
}
1053import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
if(n1 == 0) {
System.out.print(1);
}else{
System.out.print(0);
}
}
}
1054import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
if(n1 == 1 & n2 == 1) {
System.out.print(1);
}else{
System.out.print(0);
}
}
}
1055import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
if(n1 == 1 | n2 == 1) {
System.out.print(1);
}else{
System.out.print(0);
}
}
}
1056import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
if(n1 != n2 ) {
System.out.print(1);
}else{
System.out.print(0);
}
}
}
1057import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
if(n1 == n2 ) {
System.out.print(1);
}else{
System.out.print(0);
}
}
}
1058import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
if(n1 == 0 & n2 == 0 ) {
System.out.print(1);
}else{
System.out.print(0);
}
}
}
1059import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
System.out.print(~n1);
}
}
1060import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
System.out.print(n1&n2);
}
}
Reference
この問題について(コードベース100題(51~60)), 我々は、より多くの情報をここで見つけました https://velog.io/@yeomyuri42/코드업-기초-100제-5160テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol