2557번: Hello World
https://www.acmicpc.net/problem/2557
# 코드
public class Main {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
10699번: 오늘 날짜
https://www.acmicpc.net/problem/10699
# 코드
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class Main {
public static void main(String[] args) {
// 캘린더 객체
Calendar calendar = Calendar.getInstance();
// 날짜 포맷 설정
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
// 현재 시간을 가져와 포맷대로 출력
System.out.println(simpleDateFormat.format(calendar.getTime()));
}
}
7287번: 등록
https://www.acmicpc.net/problem/7287
# 코드
public class Main {
public static void main(String[] args) {
System.out.println("6");
System.out.println("viper_0");
}
}
10171번: 고양이
https://www.acmicpc.net/problem/10171
# 코드
public class Main {
public static void main(String[] args) {
System.out.println("\\ /\\");
System.out.println(" ) ( ')");
System.out.println("( / )");
System.out.println(" \\(__)|");
}
}
10172번: 개
https://www.acmicpc.net/problem/10172
# 코드
public class Main {
public static void main(String[] args) {
System.out.println("|\\_/|");
System.out.println("|q p| /}");
System.out.println("( 0 )\"\"\"\\");
System.out.println("|\"^\"` |");
System.out.println("||_/=\\\\__|");
}
}
25083번: 새싹
https://www.acmicpc.net/problem/25083
# 코드
public class Main {
public static void main(String[] args) {
System.out.println(" ,r'\"7");
System.out.println("r`-_ ,' ,/");
System.out.println(" \\. \". L_r'");
System.out.println(" `~\\/");
System.out.println(" |");
System.out.println(" |");
}
}
'코딩테스트 > 자바 문제풀이' 카테고리의 다른 글
[새싹: 배열] 백준 10871, 10807, 5597, 2738 (0) | 2024.07.06 |
---|---|
[새싹: 빠른 입출력] 백준 15552 (0) | 2024.07.05 |
[새싹: 반복] 백준 2741, 10872, 10950, 10952, 2739, 2438, 10951 (0) | 2024.07.04 |
[새싹: 조건] 백준 1330, 9498, 14681, 2753, 2420 (0) | 2024.07.03 |
[새싹: 입력과 계산] 백준 1000, 1001, 10998, 10869, 1008, 11382 (0) | 2024.07.02 |