201002 금 [BOJ] 11655, 2743

kyuhyun·2020년 10월 2일
0

1일1고리즘

목록 보기
19/20

BOJ 11655

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {	

	
    public static void main(String[] args) throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringBuilder sb = new StringBuilder();
    	
    	String S = br.readLine();
    	for(int i=0;i<S.length();i++) {
    		char word = S.charAt(i);
    		if((word > 64 && word < 78) || (word > 96 && word < 110))
    			sb.append((char)(word + 13));
    		else if((word > 77 && word < 91) || (word > 109 && word < 123))
    			sb.append((char)(word - 13));
    		else 
    			sb.append(word);
    	}
    	System.out.println(sb);
    }
}

BOJ 2743

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {	

	
    public static void main(String[] args) throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringBuilder sb = new StringBuilder();
    	
    	String input = br.readLine();
    	sb.append(input.length());
    	System.out.println(sb);
    }
}

??? 이 문제 뭐지

profile
알고리즘은 즐거워

0개의 댓글