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
- 타입스크립트
- 자료구조
- 분할메모리할당
- CPU 스케줄링
- 코드업
- 토이프로젝트
- 협업
- Operating System
- error
- Redux
- 기초100제
- Spring
- 프로그래머스
- Java
- js to ts
- 공부
- 정렬
- react
- OS
- 스프링
- 파이썬
- codeup
- 일상
- 백준
- 알고리즘
- react-redux
- memory
- 리덕스장바구니
- C++
- web
Archives
- Today
- Total
감자튀김 공장🍟
[CodeUp]JAVA 1022~1031 본문
반응형
[1022]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String data = scanner.nextLine();
System.out.println(data);
}
}
[1023]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String data = scanner.next();
String a[] = data.split("[.]");
System.out.println(a[0] + "\n" + a[1]);
}
}
[1024]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String data = scanner.nextLine();
for(int i = 0; i < data.length(); i++) {
System.out.println("\'" + data.charAt(i) + "\'");
}
}
}
[1025]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String data = scanner.nextLine();
for(int i = 0; i < data.length(); i++) {
System.out.print(data.charAt(i));
for(int j = data.length() -1; j > i; j--) {
System.out.print("0");
}
System.out.println();
}
}
}
[1026]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String data = scanner.next();
String a [] = data.split(":");
System.out.println(a[1]);
}
}
[1027]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String data = scanner.nextLine();
String a [] = data.split("[.]");
System.out.println(a[2] + "-" + a[1] + "-" + a[0]);
}
}
[1028]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// int는 -2^31 ~ 2^31-1까지, 양수 0 ~ 2^32-1 로도 사용 가능
// long은 -2^63 ~ 2^63-1까지, 양수 0 ~ 2^64-1 로도 사용 가능
long a = scanner.nextLong();
System.out.println(a);
}
}
[1029]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double a = scanner.nextDouble();
System.out.printf("%.11f", a);
}
}
[1030]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long a = scanner.nextLong();
System.out.println(a);
}
}
[1031]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
String b = Integer.toOctalString(a);
System.out.println(b);
}
}
반응형
'Algorithm > CodeUp' 카테고리의 다른 글
[Codeup]JAVA 1052~1061 (0) | 2021.03.15 |
---|---|
[CodeUp]JAVA 1042~1051 (0) | 2021.03.14 |
[CodeUp]JAVA 1032~1041 (0) | 2021.03.13 |
[CodeUP]JAVA 1012~1021 (0) | 2021.03.12 |
[CodeUp]JAVA 1001~1011 (0) | 2021.03.11 |
Comments