코드업 기초 100제 (31~40)
1031
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
System.out.format("%o",num);
}
}
1032
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
System.out.format("%x",num);
}
}
1033
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
System.out.format("%X",num);
}
}
1034
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String num = sc.next();
int num8 = Integer.valueOf(num, 8);
System.out.print(num8);
}
}
1035
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String num = sc.next();
int num8 = Integer.valueOf(num, 16);
System.out.format("%o",num8);
}
}
1036
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.format("%d", (int)ch);
}
}
1037
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.print((char)n);
}
}
1038
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n1 = sc.nextLong();
long n2 = sc.nextLong();
System.out.print(n1+n2);
}
}
1039
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n1 = sc.nextLong();
long n2 = sc.nextLong();
System.out.print(n1+n2);
}
}
1040
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.print(-n);
}
}
Author And Source
이 문제에 관하여(코드업 기초 100제 (31~40)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@yeomyuri42/코드업-기초-100제-3140저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)