Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int key = Integer.parseInt(sc.nextLine());
- int lines = Integer.parseInt(sc.nextLine());
- // System.out.println();
- for(int i = 0; i < lines; i++) {
- char result = sc.nextLine().charAt(0);
- if (i == 0) {
- System.out.println();
- }
- System.out.print((char)(result + key));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement