코드업 기초 100제 (41~50)
1041
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char ch = sc.next().charAt(0);
System.out.print((char)(((int)(ch)+1)));
}
}
1042
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();
System.out.print(n1/n2);
}
}
1043
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();
System.out.print(n1%n2);
}
}
1044
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Long n1 = sc.nextLong();
System.out.print(n1+1);
}
}
1045
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();
System.out.println(n1+n2);
System.out.println(n1-n2);
System.out.println(n1*n2);
System.out.println(n1/n2);
System.out.println(n1%n2);
System.out.format("%.2f",(float)n1/(float)n2);
}
}
1046
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 n3 = sc.nextInt();
System.out.println(n1 + n2 + n3);
System.out.format("%.1f",((float)n1 + (float)n2 + (float)n3)/3);
}
}
1047
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
System.out.println(n1*2);
}
}
1048
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();
System.out.println((int)(n1 * Math.pow(2,n2)));
}
}
1049
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);
}
}
1050
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);
}
}
Author And Source
이 문제에 관하여(코드업 기초 100제 (41~50)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@yeomyuri42/코드업-기초-100제-4150저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)