Playground/자바문제집

[백준] 2908번

미숫가루설탕많이 2023. 1. 22. 23:00
import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int A = sc.nextInt();
      int B = sc.nextInt();
      sc.close();

      A = Integer.parseInt(new StringBuilder().append(A).reverse().toString());
      B = Integer.parseInt(new StringBuilder().append(B).reverse().toString());

      System.out.println(Math.max(A, B));
   }
}

'Playground > 자바문제집' 카테고리의 다른 글

[백준] 2920번  (0) 2023.01.23
[백준] 11720번  (0) 2023.01.22
[백준] 2742번  (0) 2023.01.22
[백준] 2675번  (0) 2023.01.22
[백준] 2577번  (0) 2023.01.22