매일 Algorithm

신재원·2023년 1월 17일
0

Algorithm

목록 보기
9/243

백준 : 2908번 상수

import java.util.Scanner;

public class problem9 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
            // 백의 자리        십의 자리           일의 자리
        a = ((a % 10)*100) + ((a %100)/10) * 10 + (a / 100);
        b = ((b % 10)*100) + ((b %100)/10) * 10 + (b / 100);

        if(a > b){
            System.out.println(a);
        }else{
            System.out.println(b);
        }
    }
}

0개의 댓글