백준 5598 java

magicdrill·2024년 3월 1일
0

백준 문제풀이

목록 보기
77/654

백준 5598 java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class bj5598 {
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String text;
        String result = "";
        int i, length;
        char temp;

        text = br.readLine();
        length = text.length();
        for(i = 0; i < length; i++)
        {
            temp = text.charAt(i);
            temp -= 3;
            if(temp < 65)
            {
                temp += 26;
            }
            //System.out.print(temp);
            result += temp;
        }
        System.out.println(result);
    }
}

0개의 댓글