자바

https://www.acmicpc.net/problem/11655  import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); char[] chars = str.toCharArray(); for (int i = 0; i 'Z') || (Character.isLowerCase(ch) && n > 'z')) { n -= 26; } chars[i] = (char) n; ..
https://www.acmicpc.net/problem/10825 import java.io.*;import java.util.*;public class Main { static int N; static List students = new ArrayList(); static StringBuilder sb = new StringBuilder(); static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStrea..
https://www.acmicpc.net/problem/1076  import java.io.*;import java.util.*;public class Main { static Map map = Map.of( "black", "0", "brown", "1", "red", "2", "orange", "3", "yellow", "4", "green", "5", "blue", "6", "violet", "7", "grey", "8", "white", "9" ); static long stol(String s) { return Long.parseLong(s..
https://www.acmicpc.net/problem/1977   import java.io.*;public class Main { static int N, M, total; static int min = Integer.MAX_VALUE; static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); M = stoi(br.readLine()); N ..
https://www.acmicpc.net/problem/1145  import java.io.*;import java.util.*;public class Main { static int N; static int[] arr = new int[5]; static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new String..
· TIL ✍️
닉네임을 변경하는 API에서, 요청하는 DTO의 검증을 달고 있었다. public record UserUpdateNicknameReq( @NotBlank(message = "닉네임은 빈 값이면 안 됩니다.") @Size(min = 1, max = 35, message = "닉네임은 1자 이상, 35자 이하여야 합니다.") @Pattern(regexp = "^[a-zA-Z0-9가-힣]$", message = "닉네임은 한글 및 숫자와 영어만 가능합니다.") String nickname) {}원래 DTO는 @Pattern(regexp = "^[a-zA-Z0-9가-힣]$ 였는데, 닉넴을 monkey→1 로 바꾸는 건 됐는데, 1→monkey로 바꾸니 변경이 안 됐다. 다른 블로그를 보니 ..
https://www.acmicpc.net/problem/5635  import java.io.*;import java.time.LocalDate;import java.util.*;public class Main { static int N; static List people = new ArrayList(); static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ..
https://www.acmicpc.net/problem/9093 import java.io.*;import java.util.*;public class Main { static int N; static StringBuffer sb = new StringBuffer(); static int stoi(String s) { return Integer.parseInt(s); } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st..
https://www.acmicpc.net/problem/19532  import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int D = sc.nextInt(); int E = sc.nextInt(); int F = sc.nextInt(); // ax + by = c // dx + ey = f /..
yunjae62
'자바' 태그의 글 목록 (3 Page)